Iran's top leader banned hardline Iranian volunteers on Thursday from leaving the country to carry out suicide bombings against Israel but warned that Iran would not spare any effort to assist the militant group Hamas in other ways.

Ayatollah Ali Khamenei's ban sought to tone down calls by allies of hardline President Mahmoud Ahmadinejad to toughen Iran's stand against Israel. But they also exposed hidden rifts between the supreme leader and the president five months before elections in which Ahmadinejad, whose popularity has been waning, is seeking a second term.

Hardline Iranian student groups had asked the government to authorize volunteers to go carry out suicide bombings in Israel in support of Hamas. The students began signing up volunteers after Khamenei issued a religious decree on Dec. 28 saying anyone killed while defending Palestinians in Gaza against Israeli attacks would be considered a martyr.

But a week later, Khamenei's comments sharply contrasted his religious order.

"I thank the pious and devoted youth who have asked to go to Gaza ... but it must be noted that our hands are tied in this arena," Khamenei said on state television. He did not elaborate about what efforts Iran would take to help Hamas in other ways.

The student groups claim that more than 70,000 people throughout Iran have registered as volunteer suicide bombers since Israel launched its assault against Hamas-ruled Gaza on Dec. 27. Israel's bombardment of Gaza, which has killed about 700 Palestinians, has outraged many in Iran and the rest of the world. Israel says it launched its campaign in retaliation for Hamas rocket fire aimed at civilians in southern Israeli towns.

Iran is Hamas' main backer, and Israel has accused Iran of providing Hamas with weapons. Iran has denied the charges, saying its backing for the militant group is limited to political and financial support.

Iran also considers Israel its archenemy, and Ahmadinejad has called for Israel to be "wiped off the map."

Khamenei also criticized the United Nations and European powers for their failure to condemn Israeli bombardment of Gaza, saying Israeli attacks won't stop Palestinian resistance.

"Even if the enemy (Israel), God forbids, kills all Hamas and Palestinian combatants ... such crimes won't resolve the issue. Undoubtedly, Palestine will stand up stronger and will ultimately achieve victory," he said.

Iranian political analyst Saeed Leilaz said hardline student groups, provoked by Ahmadinejad, were getting out of control and Khamenei intervened to end any possible political manipulation of students by the president.

Criticism of Ahmadinejad has been increasing in the wake of rising inflation and the belief by some conservatives and reformists that his anti-Western rhetoric has done more harm than good for the country.

"Ahmadinejad has used the Gaza fighting as an opportunity to further radicalize the political situation in Iran for two reasons: to provoke tensions in order to cause a hike in oil prices and improve his chances of re-election in the presidential vote in June. But the top leader doesn't support a further radicalization of Iran," he said.

Oil prices have plummeted from a high near $150 in July last year to around $35 — severely straining the Iranian economy and undermining Ahmadinejad's ability to pursue his economic agenda. In recent days, oil prices has been increasing, reaching about $43 a barrel on Wednesday.

Khamenei has strongly supported Ahmadinejad since his election in 2005, but the two don't necessarily agree on all issues. Khamenei, who stands above factional politics but generally supports hardliners over reformists, reversed a decision by Ahmadinejad last year and ordered him to implement a law supplying natural gas to remote villages during a dispute with the parliament.

Leilaz said it was clear that Iran won't allow suicide bombers to cross its border and fight Israel and Ahmadinejad simply sought to manipulate the issue for his own political agenda.

In the past week, Ahmadinejad allies have been encouraging hardline students to gather in various cities. Mahdi Kalhor, Ahmadinejad's press adviser, sought to further inflame hardline protests last week when he urged the students take measures beyond street demonstrations.

"We have to be a pioneer nation (in assisting Hamas) ... why should we not be in Gaza today?" Kalhor asked a hardline student gathering on Sunday.

The same day, Ahmadinejad's brother was ordered to address the same students to calm them down. Davoud Ahmadinejad told the gathering an hour later that it was not possible to send any volunteers to Gaza, according to the semiofficial Fars news agency.

On Dec. 30, dozens of hardline students broke into the British Embassy residence in Tehran, accusing Britain of supporting the Israeli air assault on Gaza.