State Department officials explained Wednesday that as soon as they learned that 10 U.S. sailors were detained by Iran on Tuesday, they began pressing Iran into cooperating for their release, in an effort to turn the incident into a "good story" for both sides.

"The Secretary [of State John Kerry] made clear that our most important priority — and that this was critical — was that they be released, obviously, safely and unharmed and as quickly as possible," one official told reporters Wednesday.

"And that if we were able to do this – and this is something that he said to [Iranian Foreign Minister Mohammad] Zarif on a few occasions — if we are able to do this in the right way, we can make this into what will be a good story for both of us," the official added.

Officials said State learned about the event around noon on Tuesday, and that Kerry already had a call scheduled with Zarif at 12:45 p.m. After consulting with other Obama administration officials, Kerry explained to Zarif that the U.S. had lost communication with the two boats, and stressed the importance that they be returned home.

Kerry and Zarif spoke again at 2 p.m., and remained in touch throughout the day. After 3 p.m., Zarif made it clear the sailors would be released at dawn the next day.

Zarif said it was "probably not safe for them to transit during the course of the night in dark, that they had been fed, that they were being treated well," an official said.

Kerry and Zarif spoke again after President Obama's State of the Union address, and confirmed that the plan was still to release the sailors the next day.

A second official explained that the U.S. saw no reason to apologize for the incident, and that the boats were on a "routine transit mission" that didn't intend to end up in Iranian waters. That official credited the opening created by the Iran nuclear talks for giving Kerry direct access to Zarif.

"The fact that it was resolved peacefully, efficiently, and quickly really does speak to ... the importance of using these diplomatic tools to try to solve problems and using this opening that was provided by these ongoing conversations that we've had in the nuclear context," the official said.

That's what the U.S. had in mind when it sought to create a "good story" for both sides.

"In terms of a good story, I won't speak to how Iran will portray this or characterize their narrative of the situation, but I think what we had in mind, what the Secretary had in mind, was that it would be a demonstration of them operating as a responsible maritime operation in the Gulf and a responsible nation that would deal with these things in a way that other responsible nations have in the past and would going forward," the official said.

"I think it was an opportunity to demonstrate that they had the ability to cooperate and to be responsible when presented with a complicated situation like this," the official added.