MEXICO CITY — The Mexican Senate on Thursday passed a controversial energy reform bill meant to revitalize the nation's flagging oil industry — the third largest supplier to the United States.

MEXICO CITY — The Mexican Senate on Thursday passed a controversial energy reform bill meant to revitalize the nation's flagging oil industry — the third largest supplier to the United States.

The bill now goes to the lower house.

Riot police surrounded Senate offices to hold back protesters as the lawmakers voted to allow more private and foreign investment in the state-run oil monopoly Petroleos Mexicanos, or Pemex, to help boost sagging production by Mexico's oil industry.

President Felipe Calderon says the plan will help Pemex tackle deep-water drilling and put more profits in exploration.

But analysts say the watered-down bill will do little to halt the company's slide. Leftists rallied popular support to limit openings to private investment in an industry that was nationalized in 1938.

Former presidential candidate Andres Manuel Lopez Obrador, the most outspoken critic, mobilized supporters for massive street protests Thursday to try to stop approval of the plan he said could lead toward privatization.

He demanded a clause to prohibit contracts for exclusive rights to explore specific areas.

"If they are saying that this (reform) won't take oil away from the national domain, then why are they opposing adding this?" Lopez Obrador asked.

The Senate first approved the reform in general, then went back to discuss whether to add the language Lopez Obrador wanted — finally deciding against it.

As originally proposed by Calderon, the bill would have allowed private investment in oil refineries and payment based on performance for private companies to perform badly needed deep-water exploration off Mexico's coasts.

The measure would make it easier for private companies to take part in drilling projects. But they would be banned from building or operating oil refineries. Contracts for badly needed deep-water exploration would be allowed only on a straight contractual basis, without the results-based bonuses proposed under the original plan.

"It remains to be seen how the new contracts play out in practice but at this point there isn't anything interesting there for new players to get involved in the industry," said David Shield, an independent energy expert in Mexico City who has written books on Pemex.

So far this year, Mexico has produced an average of 2.8 million barrels of oil a day, down 10 percent from 2007 levels.

The country's largest oil field, Cantarell, is drying up. Experts say the country's proven reserves will last only 10 more years.

Pemex hopes deep-water Gulf reserves will offset declining production, but it lacks the expertise to carry out deep-water drilling.

Mexico's Constitution bars most outside involvement in Pemex, although the company contracts services from some private companies.

Mexico sends more than 1 million barrels a day to the U.S., making it the third-largest source of U.S. oil behind Canada and Saudi Arabia, so America also stands to lose if Pemex doesn't develop its reserves.

"Declining oil production from Pemex is a major short-term problem that won't be resolved by this reform," Shields said.

What's more, paying outside firms to explore for oil rather than giving them a share of any profits could hurt Pemex's bottom line. Drilling in water as deep as 10,000 feet (3,050 meters) is extremely costly — each deep-water discovery by Britain's BP PLC cost more than US$1 billion — nearly as much as Pemex's reported net losses for 2007.

Oil revenues make up about 40 percent of Mexico's budget.