The British prime minister, Tony Blair, has expressed relief at the release of the 15 British sailors. But how was the news received in Iran?
People inside the country gave their reaction to the BBC News website and BBC Persian.com.
ALI ALIAKBARI, BUSINESSMAN, TEHRAN
It's down to negotiation that we have had a successful outcome. It's a massive relief.
Faye Turney was the first of the fifteen sailors to be shown on TV
I'm pleased that no-one came to any harm and the incident was resolved satisfactorily for both sides - Iranian and British.
There is a long way to go in the relationship between Britain and Iran. This crisis has been resolved but there is a lot of fence-mending to do.
I think we need an urgent review of British policy in Iran.
Politically, Iran requires diplomatic initiatives with regards to the global isolation we face.
There was a news black-out over the Iranian holiday. But since our media has been back online, all outlets have been raising this issue and asking lots of questions.
All Iranians I know are as happy as me that this issue has been resolved.
AKBAR JAVADI, NEWS ANALYST, IRAN
This situation was defused in the nick of time. I'm so pleased.
Everyone feels immense relief that this ghastly incident is now over.
People are just starting to really talk about it now.
This satisfactory solution was achieved by direct negotiations and diplomacy.
There is some speculation among the Iranian people about whether or not the boat was found in Iranian waters.
Some are wondering whether the whole thing was stage-managed.
NARIMAN MOSTOSI, STUDENT, IRAN
It is a good thing they have been released, especially the lady.
The Iranian people are glad it's come to an end.
We saw the pictures of the sailors on the national news service. Iranians were happy that the sailors were well cared for.
The pictures clearly show that.
The majority of people here believe the sailors were in Iranian territorial waters and the British government should apologise.
People are a little bit upset about that.
However, with the release, we hope this is the end of the problem.
SINA, TEHRAN, IRAN
It's very interesting! Passing through VIP lounge with suits and gifts!
On the other side of the Atlantic they dress them in orange clothes, blindfolded and shackled while being threatened by dogs.
I didn't exactly understand what Mr Blair's 48 hour announcement was about.
What was it that suddenly made Iran so soft? What did they whisper in their ears?
Honestly, Ahmadinejad has the world in his hands. I didn't like him before, but now I admire him.
EBRAHIM, TEHRAN, IRAN
The British sailors should thank God that they are not Iranian, nor students or teachers.
Otherwise they would have been locked up by the Revolutionary Guards and the Intelligence Services and they would never have been released so easily.
At the end of the day I'm happy that no one was harmed.
I think Blair and Ahmadinejad each think they have come out of this looking like the winner.