The mayor of Mexico City, a quake-prone metropolis of 20 million people, said on Friday he is planning a warning system that will send alerts directly to mobile phones seconds before an earthquake strikes.

The capital, built on top of a lake, suffered the devastating effects of an 8.1 magnitude quake in September 1985 that killed thousands when buildings were leveled across the city just as people got ready for work and school.

I think we will have it in place soon, because it is not too complex, Mayor Marcelo Ebrard, a likely contender in the 2012 presidential election, told reporters. We want it to be in place before September, he said.

Ebrard, who has adopted social media like Twitter to immediately communicate with citizens whenever there is a strong quake or streets are flooded after storms, said the capital's government is in talks with cell phone service providers to make the alert happen.

This year, a top executive from America Movil, parent of Telcel, the largest cell phone brand in Mexico, told Reuters that the company's existing network allowed for this kind of quake alerts to users.

Ebrard declined to mention which companies would be included in his quake alert plan for wireless phones. The city already has an alert broadcast through radio seconds before a quake hits, but it doesn't always trigger on time.

The mayor, who will compete with his political mentor Andres Lopez Obrador to become Mexico's leftist candidate for the 2012 elections, is also expanding a program offering bike rentals in a bid to curb traffic during rush hours.

By installing bicycle stations in two other busy business centers in the city -- wealthy Polanco and the historic downtown -- Ebrard expects to have more than 70,000 bikes working by the end of year.

(Additional reporting by Miguel Angel Gutierrez; editing by Anthony Boadle)