SAN FRANCISCO — After battling electricity producer Mirant Corp. for nearly a decade in court and elsewhere, the city of San Francisco inked a $1.1 million settlement Thursday that includes $100,000 in legal fees and costs for the city attorney’s office.

Mirant has agreed to shut down its Potrero power plant permanently by the end of 2010, and the city plans to use the $1 million to pay for pediatric asthma programs in communities near the power plant. In exchange, the city pledges not to interfere with the company’s interim operating permits for the plant through 2010.