The brother of Iranian President Hassan Rouhani has been released after being detained for two days by police, Iranian media say.
Hossein Fereydoun was freed on Monday night after reportedly paying millions of dollars of bail.
Mr Ferydoun is believed to have been taken in for questioning on Saturday in connection with a corruption probe.
His detention was seen by some commentators as part of a feud between the president and the judiciary.
Mr Rouhani, a relative moderate, openly attacked the conservative-dominated judiciary and security services during his re-election campaign earlier this year. He criticised arrests made on loose grounds and called for the release of political prisoners.
It is unclear exactly why Mr Fereydoun was summoned for questioning. Judiciary spokesman, Gholamhossein Mohseni-Ejeie said he was the subject of "multiple investigations".
Although he did not occupy an official position, Mr Ferydoun was a close aide to Mr Rouhani during his first term in office, participating in negotiations with world powers over Iran's nuclear programme.
Mr Fereydoun has been linked to last year's so-called "payslip scandal", where some public sector officials were found to have been paid exorbitant salaries.
He has not been charged with any offence and has denied any wrongdoing.
His detention at the weekend was ordered after he failed to pay bail, initially reported to be as much as 500bn rials ($15.3m; £11.5m).
Mr Fereydoun was transferred to hospital on Monday after falling ill during a court appearance, according to the Tasnim news agency.
President Rouhani has not yet commented on his brother's case.