The city released hundreds of e-mail messages Friday, providing a behind-the-scenes look at one of the major battles of Mayor Michael R. Bloomberg’s administration, the 2010 campaign to expand charter schools, or, as one dramatic e-mail put it, the “fight of our life.”

The e-mails, released in response to a Freedom of Information request by the city’s teachers’ union, detail the central role that Joel I. Klein, who was then the schools chancellor, took in the effort, including constant contact with charter school advocates and lobbyists for the city. They were then fighting to raise the statewide cap on charter schools to at least 400 from 200 and communicated regularly about their struggles to herd state lawmakers to their side and their exasperation with the union.

The mayor and Mr. Klein supported charter schools, which are privately run with public money, as a way to offer parents in poor neighborhoods alternatives to underperforming schools. But teachers’ unions say charter schools, which are typically nonunionized, do not outperform regular schools and simply take space and resources from them.

“We need to mobilize,” Mr. Klein wrote on the night of Jan. 18 to James Merriman, head of the New York City Charter School Center. “Every time we keep our powder dry, we shoot ourselves.”