Iran's Oil Ministry, the mainstay of the economy, has been rudderless since August and parliamentary hostility to the new president has exposed bitter rifts in the conservative camp.
Several analysts and lawmakers said the Guardian Council, Iran's constitutional watchdog, might have to rule on the next step since the maximum three months stipulated for ministry posts to be filled had now expired.
The president, who sparked international outrage in October by calling for Israel's destruction, re-appointed Kazem Vaziri Hamaneh as caretaker oil minister, a post he has held since August, state television said.
"This vote of no-confidence should carry a message to Ahmadinejad about his method of choosing his oil ministers," conservative lawmaker Ali Riaz told Reuters after the vote.
Out of 254 parliamentarians, who cast votes on Wednesday, only 77 voted in favour of Mohsen Tasalloti, a veteran of the petro-chemicals industry. Lawmakers heartily congratulated one another when the results of the vote were read out.
Bad for economy
"This vote of no-confidence should carry a message to Ahmadinejad about his method of choosing his oil ministers"
Lawmakers accused Ahmadinejad of only consulting with a small number of his close allies instead of them.
"Ahmadinejad has a slogan of co-operation between parliament and government, but it would be better if he actually conferred with his lawmakers," Sattar Hedayatkhah said in the debate before the vote.
The failure to select an oil minister has severe economic implications for the second biggest exporter in the Organisation of the Petroleum Exporting Countries (OPEC), which derives 80% of its export earnings from hydrocarbons.
"This delay is wasting Iran's huge oil and gas assets and damaging its economy," said Manouchehr Takin from the Centre for Global Energy Studies.
Conservative parliamentarian Kazem Jalali told Reuters a competent manager had to be found soon.
"The current situation weakens our stance in OPEC and will diminish our chances of cooperation with foreign companies because it indicates instability," he said.
Lawmakers had rejected Ahmadinejad's first nominee in August.
The second candidate pulled out of the race earlier this month, moments before lawmakers were due to cast their votes.
Ahmadinejad made oil a keystone of his election campaign in June and has therefore been keen to appoint an ideologically close comrade as oil minister.
Ahmadinejad made oil a key
issue of his election campaign
He has vowed to distribute the country's oil wealth more fairly, favour domestic over foreign investors and rid the hydrocarbons industry of the "mafias" he says run it.
Kamal Daneshyar, head of parliament's energy commission, said lawmakers had 10 names of suitable candidates with a profound knowledge of the oil business. He was not immediately available to give more details.
"Ahmadinejad thinks the Oil Ministry needs cleaning out. He is stubborn but I think he will finally have to come round and choose an Oil Ministry insider," said an Iranian political analyst who declined to be named.
Cleaning out the Oil Ministry is frustrating a president who is making a clean sweep of other ministries, his country's ambassadors and the heads of financial institutions.
Foreign oil firms doing business with Iran include Royal Dutch Shell, Italy's ENI and France's Total.