Updated

TEHRAN, Iran -- Iran's parliament voted on Wednesday to take Mahmoud Ahmadinejad to court over his takeover of the country's vital oil ministry, escalating the power struggle between the president and the hard-line establishment that has turned against him.

The 165-1 vote was the latest salvo in the political maneuvering that began when Ahmadinejad publicly challenged Iran's supreme leader in April, only to back down. The confrontations appear to be part of a power struggle ahead of parliamentary elections next year and the vote for Ahmadinejad's successor in mid-2013.

Lawmakers were infuriated when Ahmadinejad consolidated a series of ministries, fired the oil minister and named himself as the replacement. The takeover also technically puts Ahmadinejad at the helm of the Organization of the Petroleum Exporting Countries, since Iran this year holds the rotating presidency.

It's unclear whether Wednesday's vote in the 290-member parliament will actually be followed by charges or a lawsuit against Ahmadinejad, but it clearly pits the president against a majority of lawmakers, including parliamentary speaker Ali Larijani, a leader of a rival camp within the president's conservative political bloc. If charges proceed against the president, he could well face an investigation by the judiciary, which is led by Larijani's brother.

Ahmadinejad was re-elected president in 2009 in a disputed vote that sent Iran into its worst internal chaos since the 1979 Islamic Revolution. He has tried unsuccessfully to position a protege to succeed him, but many of his allies, including the Larijani brothers and apparently Supreme Leader Ayatollah Ali Khamenei, are turning against him in their own efforts to retain power.

The legislators voted 165-1 to refer Ahmadinejad to the judiciary after a parliament committee report concluded his action in taking over the oil ministry was unconstitutional. Some lawmakers have already hinted that he may stand to gain financially from the self-appointment. Remaining lawmakers were absent or abstained.

"This illegal and hasty action will damage the Islamic Republic of Iran's interests on the global level," the parliament committee report said. "As (caretaker) oil minister, Ahmadinejad has issued and will continue to issue orders that are obviously illegal interference."

William Martel, a professor of International Security at Tufts University's Fletcher School, concurred that Ahmadinejad's takeover of the oil industry "doesn't bode well for global energy markets."

"With Iran's record in the last handful of years on a range of foreign policy issues, I don't know that this would be seen as terribly reassuring to the global energy market," he said.

Martel also said that Ahmadinejad's behavior strikes him as "authoritarian, erratic and unpredictable."

About 50 legislators have signed a petition to summon Ahmadinejad to appear in parliament to answer questions, short of the one-quarter needed to order a president for questioning before the Iranian assembly for the first time since 1979.

Those behind the petition want Ahmadinejad to respond to a long list of accusations, including refusing to carry out laws passed by parliament, withdrawing money from state funds without authorization and his alleged lack of transparency on budget spending.