Video report by ITV News International Affairs Editor Rageh Omar
Rob Macaire was arrested in Tehran on Saturday after attending a vigil for the victims of the Ukrainian plane crash, which killed 176 people on board, including four Brits.
In response, the Foreign Office called in Hamid Baeidinejad for a meeting with Middle East Minister Andrew Murrison who described the arrest as "a flagrant violation of international law".
Commenting after the meeting, Mr Murrison added: "It is important that Iran understands how seriously we take this matter.
"It must not be allowed to happen again. I made that clear to the Iranian ambassador this afternoon."
Answering an urgent question in the House of Commons on Monday, Foreign Secretary Dominic Raab said the Iranian ambassador was being summoned "to demand an apology and to seek full assurances that this will not happen again".
Mr Raab told MPs: "Given the treatment of the ambassador we are keeping security measures for the embassy under review.
"The regime in Tehran is at a crossroads. It can slip further and further into political and economic isolation.
"But there is an alternative and the regime does have a choice: the diplomatic door remains open, now is the time for Iran to engage in diplomacy and chart a peaceful way forwards."
Mr Macaire said he was attending a vigil for those killed when a passenger plane that was travelling to the Ukrainian capital, Kyiv, was shot down early on Wednesday, near Tehran.
The British diplomat said he left the vigil when protests began, however he was summoned to the foreign ministry in Tehran to explain his "illegal and inappropriate presence" at the event.
The prime minister's official spokesman said: "In relation to the arrest of the UK's ambassador over the weekend, I would say this was an unacceptable breach of the Vienna Convention and it needs to be investigated.
"We are seeking full assurances from the Iranian Government that this will never happen again.
"The FCO has summoned the Iranian ambassador today to convey our strong objections."
Families of the victims of the downed Ukrainian International Airlines flight could seek compensation from the Iranian government, Downing Street indicated.
"As a first step we need a comprehensive, transparent and independent investigation to know exactly what happened," the prime minister's official spokesman said.
"Of course the families of the four British victims deserve justice and closure and we will continue to do everything we can to support them in getting that, including options for compensation."