The Los Angeles City Council has voted to ban the possession of high-capacity gun magazines following deadly mass shootings nationwide.

Tuesday's 12-0 vote closes a loophole in state law that banned the manufacture and sale of magazines holding more than 10 rounds of ammunition -- but not their possession.

Mayor Eric Garcetti says he'll sign the measure, saying it will save lives and prevent crime.

People who have the magazines will have 60 days from the time the law takes effect to sell, destroy or take them out of the city.

Councilman Paul Krekorian led a two-year push for the ban. At a rally before the vote, he mentioned mass shootings near the University of California, Santa Barbara; at Sandy Hook Elementary School in Newtown, Connecticut; and at a reserve center in Chattanooga, Tennessee.