WASHINGTON — A senior White House official wanted to talk about the Obama administration’s foreign policy priorities Wednesday but instead spent most of his news conference responding to reporters’ questions about Iran’s detention of two U.S. Navy patrol boats, saying the incident won’t affect the Iran nuclear deal.

The boats had experienced mechanical failures Tuesday and drifted into Iran’s territorial waters in the Persian Gulf, said Ben Rhodes, White House deputy national security adviser, during a question-and-answer session at the Foreign Press Center. Because it was an “accident,” Secretary of State John Kerry does not necessarily need to apologize to Iran, Rhodes said. Iran announced the release of the sailors on Wednesday morning.

Rhodes said that Kerry, a former naval officer, believes the sailors handled the incident “professionally.”

“He understands more than anyone what role the sailors play and what risks they take,” he said.

Kerry delivered a speech earlier on Wednesday at the National Defense University in which he credited the sailors’ quick release to improved diplomatic relations between the two countries. When asked if the Obama administration is “overselling” the value of diplomacy in dealing with Iran, however, Rhodes said that the White House is far from overly optimistic about relations between the two countries and that “serious issues” remain. “We’re clear-eyed about the challenges that remain in the relationship, and that’s one of them,” he said.

Rhodes also noted that Kerry says the incident will not affect the final implementation of the Iran nuclear deal, as Iran fulfills its final obligations for the United States to suspend sanctions.

Incidents at sea such as this one rarely escalate much, said Suzanne Maloney, deputy director of foreign policy at the Brookings Institution. She said that Kerry’s diplomatic management of the situation mirrors the business-like “normal protocol” of handling similar naval situations. She said that the quick de-escalation indicates a greater level of trust in the relationship, but that too much should not be read into the fast release of the sailors.

“I think it’s a small step forward,” she said. “We’ll have to wait and see if this kind of cooperative atmosphere can sustain itself after the Iranians receive sanctions relief.”