Foreign Office minister Andrew Murrison has warned that Iran "needs to stop" attacks in the Gulf of Oman.
His visit to Tehran comes after the US accused Iran of attacking oil tankers earlier this month, which Iran denies.
Dr Murrison said the UK believes Iran "almost certainly bears responsibility for the attacks" and made clear UK concerns over activities in the region.
Foreign Secretary Jeremy Hunt said the situation was "extremely serious" and he spoke to Iran officials "regularly".
"This visit has provided an important opportunity for open, frank and constructive engagement with the Iranian government," said Dr Murrison, following talks with the Iranian government this weekend.
"In Tehran I was clear about the UK's long-held concerns over Iran's activities in the region.
"And I was clear that the UK will continue to play its full part alongside international partners to find diplomatic solutions to reduce the current tensions."
Dr Murrison's visit took place as tensions continue to escalate between the US and Iran.
On Thursday morning, the US came close to launching airstrikes on Iran after it shot down a US drone.
The US and Iranian governments dispute whether it was in international airspace at the time.
The shooting down of the drone followed accusations by the US that Iran had attacked two oil tankers just outside the Strait of Hormuz, in the Gulf of Oman. Iran rejects the allegation.
Dr Murrison's visit also aimed to raise international concerns about Iran's threat to cease complying with the Iranian nuclear deal after the US abandoned the agreement in 2018.
But according to the Reuters news agency, Iran's deputy foreign minister, Abbas Araqchi, insisted the country would stick to its decision to scale back some of its commitments under the 2015 deal.
"The European signatories of the deal lack the will to save the deal," he said after meeting Dr Murrison.
"Our decision to decrease our commitment to the deal is a national decision and it is irreversible as long as our demands are not met."
During his visit, Dr Murrison also pushed for the release of British-Iranian Nazanin Zaghari-Ratcliffe.
She was jailed by an Iranian court for five years in 2016 over a disputed spying conviction, which she denies.
She and her husband have gone on hunger strike in protest at her ongoing detention.