By AMANDA ANDRIES & RACHEL SILBERSTEIN

Mayor Michael R. Bloomberg on Thursday made a strong push for environmentalism  – a plan to create 20 percent more parking spaces for electric cars and another to ban plastic foam, – in his 12th and final State of the City address.

The event, against a glittery backdrop of hip hop music and dancing cheerleaders,  had a valedictory air as the mayor tried to cement his legacy and announce a final sweep of strategies to transform the Big Apple into the Green Apple. These proposals come in the wake of an ambitious three-term mayoralty featuring several smoking bans, a trans fat ban, soda ban, campaign for more bike lanes and support of mass transit, as well as school reform and other measures.

Bloomberg also aired his plan to expand recycling to include yogurt and salad containers, create a curbside composting system and add electric cars and electric car chargers at gas stations around the city.

Bloomberg said that the curbside composting project would begin in Staten Island and if successful would expand to the rest of the city. The mayor added that food waste in land fill, cost the city $80 per ton, when it could be used to improve parks.

The mayor focused on development, expansion of universities, hurricane relief, school reforms.

Bloomberg’s speech had a pugnacious tone as he defended his most controversial policies, like stop and frisk and his support of charter schools, vowing to open up 21 more charter schools across the city. He also defended his unpopular campaign to dismantle the bus drivers union.

The New York Restaurant Association objected to the plastic foam ban, saying it could adversely affect mom and pop restaurants around the city.

“The alternatives to Styrofoam are two to five times more expensive,” said association spokeman Andrew Moesel. “Styrofoam as also has good structure for heat retention. We understand that the city is trying to lower its own costs which is admirable, but we hope that it is not at the expense of small business owners.

The material in question is not strictly styrofoam, chemists say, but a closely related polysterene.

On his and Police Commissioner Ray Kelly’s aggressive stop-and-frisk policy, he said, “We can’t let politics trump public safety, and for the next 320 days – at least we won’t”

He also cast the union representing striking school bus workers as a “special interest” and scolded Democrats for opposing his attempt to break the union

Mayoral contender and Public Advocate Bill de Blasio immediately criticized the mayor’s statement on stop and frisk, disparaging the allegation that the tactic reduced crime

“It just came out that stop-and-frisk went down 20 percent last year and violent crime went down too, so why on earth?” de Blasio said.

Bloomberg expressed a sense of urgency to complete unfinished projects in the next year because “special interests and campaign donors have never had less power than they’ve had over the past 11 years,” implying that the future mayoral candidates would be more succeptible to campaign donations.

This drew criticism from City Comptroller John Liu, another mayoral hopeful. “Many would argue thaat City Hall has been cluttered with special interest groups,” said Liu, “particularly in the name of high-priced consultants who have essentially taken over operations once run by city employees, causing huge amounts of waste for the taxpayers.”

Listing his plans for his final year in office, Bloomberg also vowed to ease marijuana laws, saying that those arrested for possession would no longer  be held over night.

“Effective next month, anyone presenting and ID and clearing a warrant check, will be released directly from the precinct with a desk appearance ticket to return to court,” he said

The event, which coincided with the mayor’s birthday, was a festive affair, opened by Brooklynettes dancers, and accompanied by self-aggrandizing tracks like Christina Aguilera’s “Ain’t No Other Man” and Alicia Keys’ “New York.” Huge banners, declaring the mayor’s accomplishments, hung from the rafters.