Speaking on Sunday on the sidelines of a meeting with Ali Larijani, the senior Iranian nuclear negotiator, he said his militia was formed to defend Islam.
"The forces of Mahdi Army defend the interests of Iraq and Islamic countries," al-Sadr said. "If neighbouring Islamic countries, including Iran, become the target of attacks, we will support them.
"The Mahdi Army is beyond the Iraqi army. It was established to defend Islam."
Al-Sadr's comments could be seen as a message that Tehran has allies who could make things difficult for US forces in the region if Iran's nuclear facilities are attacked.
Al-Sadr has a large following among Iraq's young and impoverished Shia community. His militia launched two uprisings against US troops in Iraq in 2004, but since the fighting ended he has transformed himself into a political figure.
Al-Sadr's al-Mahdi Army fought
US troops in Iraq in 2004
Al-Sadr's followers now hold 21 seats in the outgoing parliament as well as three cabinet posts.
Al-Sadr's backing of Iran, a Shia-majority nation, comes after a hint from Israel's defence minister that the Jewish state was preparing for military action to stop Iran's nuclear programme.
But Larijani said that Tehran was capable of defending itself. "I don't see any threat against Iran," he said after his meeting with al-Sadr. "Iran is big and strong and it is a hard target."
Iran's Foreign Ministry spokesman said earlier on Sunday that Israel would be making a "fatal mistake" should it resort to military action.
Iran has said that Israel is living in a "glass house" and is well within Iran's missile range.
"If neighbouring Islamic countries, including Iran, become the target of attacks, we will support them"
Iraqi Shia cleric
An upgraded version of Iran's Shahab-3 missile has a range of more than 2000km, keeping all US forces in the Middle East and Israel within its range.
Iran's resumption of its nuclear research programme earlier this month has caused an international stand-off and a flurry of meetings.
Some Western nations fear that Iran is using its civilian nuclear programme as a cover to develop an atomic bomb. Iran says it is using it for peaceful energy purposes.