Iran has congratulated the Libyan people after rebels overran the capital Tripoli, saying the rebellion there indicated the necessity of submitting to the "legitimate demands of the people."

"The Islamic Republic of Iran congratulates the Muslim people of Libya whose firm stand in recent months portrayed another symbol of popular movements in the region," a foreign ministry statement carried by the official IRNA news agency said.

"The popular uprising in Libya once again showed that submitting to the legitimate demands of the people and respecting their opinions is an undeniable necessity," the statement said.

"As always, the Islamic Republic of Iran is prepared to share its experiences on the path to realising freedom, justice, ... and development ... with the brother nation of Libya."

Relations between Shiite majority Iran and Muammar Gaddafi's regime were soured by the disappearance in Libya in 1978 of the Iranian-born Imam Moussa Sadr, who is considered a spiritual leader of Lebanon's Shiites.

Imam Sadr campaigned in the 1970s to improve conditions for Shiites, who were largely under-represented in Lebanon's political life but vanished without trace on a visit to Libya.

Since the Libyan uprising erupted in mid-February, Iran has adopted a dual approach -- criticising the Gaddafi regime for its violent assaults on the rebels while at the same time condemning NATO's military intervention.

Iranian supreme leader Ayatollah Ali Khamenei in March condemned NATO's involvement, saying it was aimed at "getting their hands on Libya's oil" as he offered support to the rebels.

"They (NATO) claim they want to defend the people by carrying out military operations or by entering Libya... You did not come to defend the people, you've come after Libya's oil," said Khamenei, who has the final say on Iran's national issues.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.