DUBAI (Reuters) - The son of influential former Iranian President Akbar Hashemi Rafsanjani was released from prison on Sunday night after spending more than two months in detention, the official IRNA news agency reported.

Mehdi Hashemi Rafsanjani, accused of inciting post-election unrest in 2009, arrived in Iran in September after spending three years in Britain following the widespread protests at the re-election of President Mahmoud Ahmadinejad.

Hours after his return, the 43-year-old presented himself at court to hear the charges and face questioning. Rafsanjani was then transferred to Tehran's Evin prison after the court issued a temporary detention order, according to the media.

"After the completion of investigations, Mehdi Rafsanjani was released from Evin prison on bail," IRNA reported, without giving further details.

Akbar Hashemi Rafsanjani, one of the founding figures of the Islamic Republic and a close aide to the revolutionary leader Ayatollah Ruhollah Khomeini, has held most of Iran's top political positions, including parliament speaker, armed forces commander and president from 1989 to 1997.

The wealthy Rafsanjani family has faced pressure from hardliners since the disputed 2009 vote, which set off the worst unrest in Iran since the 1979 Islamic Revolution.

The pragmatic conservative's power has waned since he expressed sympathy for opposition demonstrators after the vote.

However, as oil and banking sanctions bite, some analysts have said that Rafsanjani could make a surprise comeback bid for the presidency at an election scheduled for June 2013.

Rafsanjani's daughter Faezeh, a former lawmaker and a women's rights activist, was also arrested in September and is serving a six-month jail sentence for "spreading anti-state propaganda". Faezeh was detained briefly in 2009 after addressing supporters of Ahmadinejad's main election rival, Mirhossein Mousavi, who himself has been under house arrest since February 2011.

(Editing by Stephen Powell)