Averting a looming court battle over how it has been handling a steady exodus from its Internet dial-up service, AOL has agreed to make it easier for its remaining customers to leave as part of a $3 million settlement with 48 states and the District of Columbia.

The resolution announced Wednesday was driven by a deluge of complaints from AOL customers who said they tried to close their accounts, only to be thwarted in their attempts or discover they were still being billed for services that they thought had been canceled.