Two high-profile judiciary cases in Iran this weekend have underlined renewed political tensions between the country's recently re-elected president, Hassan Rouhani, and establishment hardliners.
The first case involves the arrest of the president's own brother, and the second an American academic jailed for 10 years after being convicted of espionage.
The arrest of Hossein Ferydoun, Hassan Rouhani's brother who goes by a different surname, was not wholly unexpected.
During Mr Rouhani's first term, Hossein Ferydoun was one of his most trusted advisors.
Although he did not occupy any official position Mr Ferydoun was present at the high-level international nuclear negotiations over Iran's nuclear programme, acting as the president's "eyes and ears".Image copyright AFP Image caption Hossein Ferydoun was one of the president's closest advisers
He has frequently been the target of corruption allegations, most notably during last May's bitterly hard-fought presidential election, when President Rouhani's two main challengers, Ebrahim Raisi and Mohammad Baqer Qalibaf, frequently mentioned him and also accused Mr Rouhani of nepotism for continuing to support him.
Although Mr Rouhani won the election with a clear majority, the two losing candidates show no signs in backing down in their criticism of him.
While the charges against Mr Fereydoun are not clear, a spokesman for the Iranian judiciary said on Monday that he had been detained in relation to an ongoing investigation. He was subsequently freed on bail, according to reports.
Media playback is unsupported on your device
The second case, which made headlines around the world, was the 10-year prison sentence for Xiyue Wang, a Princeton post-graduate history student who was in Iran doing research for a doctoral thesis on late 19th Century and early 20th Century history.
He is reported to have been arrested several months ago but the news only became public when the sentence was announced, and few details are known.
Commenting on the case without naming Mr Wang, an Iranian judiciary spokesman described him as "an American infiltrator".
An Iranian news site with ties to the Judiciary said Mr Wang was part of a "spider network" - Iranian code for a spy ring.
Whether by coincidence or part of a meticulous plan, both cases share one important aspect: both will put President Rouhani in a difficult position, both at home and abroad, as he begins a second term facing big challenges to fulfil the expectations of an electorate hoping for reform and economic progress.
Inside Iran, the arrest of the president's brother and most trusted adviser is seen by many observers as a major blow to his plans for the next four years.
If the case goes further and charges are made, specially charges of corruption, it could pave the way for more accusations to be made against other officials and even the president himself.Image copyright EPA Image caption US-Iran tensions have risen in recent months
Outside Iran, the arrest of Mr Wang, a dual Chinese-US citizen puts even more pressure on an already fragile relationship with the US government.
President Trump and his administration have taken a much harder line on Iran than their predecessors.
The president has made clear his distaste for the 2015 nuclear deal, but while it remains in place for now, there have been no official contacts between Iran and the US since he took over, and the two countries have traded mutual accusations.
The jailing of Mr Wang can only cause more bitterness and widen the gap between the two sides.
Mr Wang is certainly not the first US citizen to be jailed in Iran - although all of the other current detainees are joint US-Iranian nationals.
But every time a case like this arises the result is more bad headlines, diplomatic headaches, and long negotiations which often end with none of the initial accusations being proved.
It's still too early to predict what the outcome will be for both of these current cases, and the details are still too sketchy.
One thing is certain though - both cases carry a very strong message to a president who very publicly challenged the establishment, judiciary and revolutionary guards during recent presidential campaigns, accusing them of not only sabotaging nuclear negotiations but also his domestic plans for reforming Iran's politics and economy.
They are accusations that the hardliners are not likely to forget and one for which they will be seeking revenge.