A ballot measure to cap the number of medical marijuana shops in Los Angeles won in last month's election with support from nearly every corner of the city, according to a Times analysis of election returns.

Proposition D received majority support in virtually all of the hundreds of city precincts, including areas represented by outspoken opponents to the measure on the City Council.

In the final tally released last Friday by the city clerk, Proposition D passed with support from 62.4% of the 376,000 city residents who voted on the measure.

RESULTS: Los Angeles general election

The majority voted yes in all 15 City Council districts, including those represented by Councilmen Mitchell Englander and Jose Huizar, who in part cited constituent concerns when they opposed the measure before election day.

Under Proposition D, only those medical marijuana dispensaries that opened before a failed 2007 moratorium on pot shops are allowed to remain. The city attorney is in the process of enforcing the law.

MAP: L.A. mayoral election results 

Two competing ballot measures failed to win support. One of them, Measure F, would have allowed unlimited pot shops as long as they met certain requirements. Another, Initiative E, would have only allowed the pre-moratorium pot shops but did not include a tax increase, which Proposition D did.

ALSO

Man in Northridge standoff arrested in girlfriend's slaying 

Santa Monica shooter said goodbye to friends in farewell note

Rapper 2 Chainz arrested at LAX with marijuana, "purple drank"

Twitter: @palewire

Twitter: @katelinthicum

ben.welsh@latimes.com

kate.linthicum@latimes.com