A British-Iranian national has been executed in Iran after being accused of spying for the UK.
Prime Minister Rishi Sunak said he was "appalled" by the execution of Alireza Akbari, saying: "This was a callous and cowardly act, carried out by a barbaric regime with no respect for the human rights of their own people.
"My thoughts are with Alireza's friends and family."
Foreign Secretary James Cleverly added: "Iran has executed a British national.
"This barbaric act deserves condemnation in the strongest possible terms.
"This will not stand unchallenged."
Iran's charge d'affaires in London has been summoned to the Foreign Office to make clear the government's "disgust", he said.
The government also sanctioned Iran's prosecutor general, Mohammad Jafar Montazeri, who it said was one of the most powerful figures in Iran's judiciary and was responsible for the trial process and use of the death penalty.
Mr Cleverly said: "The prosecutor general is at the heart of Iran's barbaric use of the death penalty for political ends.
"Sanctioning him today underlines our disgust at Alireza Akbari's execution and our commitment to holding the regime to account for its appalling human rights violations."
The sanctions impose an asset freeze and UK travel ban on Mr Montazeri.
David Lammy, Labour's shadow foreign secretary, said the Iranian regime "must be held accountable for its flagrant breaches of human rights and international law".
The Iranian judiciary claimed Mr Akbari, who was deputy defence minister under former president Mohammad Khatami until 2001, was a "key spy" for the British government, according to the semi-official Tasnim news agency.
It said Iranian intelligence unmasked the alleged MI6 spy by feeding him false information and described him as "one of the most important infiltrators of the country's sensitive and strategic centres".
'Drugged and tortured'
Mr Akbari claimed he was tortured and given mind-altering drugs and forced to confess to crimes he did not commit.
Iran's Mizan news agency, associated with the country's judiciary, tweeted that Mr Akbari had been hanged. It did not say when or where it took place amid rumours he had been executed days ago.
Sky News Middle East correspondent Alistair Bunkall said Mr Akbari was arrested in 2019 and charged with spying after he was accused of receiving "hundreds of thousands of pounds" for providing intelligence to Britain - claims he denied.
"His family in Tehran were called to his prison on Wednesday for what was described as a 'final visit'," Bunkall said.
He added that Mr Akbari's family members had reported he had been moved to solitary confinement during his time in prison.
Mr Cleverly had appealed for Mr Akbari's release when reports of his planned execution emerged.
Commons Foreign Affairs Committee chair Alicia Kearns had also condemned the planned execution, accusing the regime in Tehran of reacting because it felt "cornered" as a result of international sanctions and anti-government protests.
"It is another horrifying example of the Iranian regime, because they feel they are cornered, because there is such significant pressure from sanctions, weaponising British nationals and industrialising hostage-taking," she told the BBC.
On Friday, US State Department deputy spokesman Vedant Patel said: "The charges against Alireza Akbari and his sentencing to execution were politically motivated. His execution would be unconscionable.
"We are greatly disturbed by the reports that Mr Akbari was drugged, tortured while in custody, interrogated for thousands of hours, and forced to make false confessions."
She added: "More broadly, Iran's practices of arbitrary and unjust detentions, forced confessions, and politically motivated executions are completely unacceptable and must end."