Iran's military said the US targeted two ships entering the Strait of Hormuz and carried out strikes on Iranian territory.
The US military said it fired in response to Iranian attacks.
US President Donald Trump told reporters the ceasefire was still in effect and sought to play down the exchange.
"They trifled with us today. We blew them away," he said, while inspecting renovations to the Lincoln Memorial's reflecting pool in Washington.
A spokesperson for Iran's Khatam al-Anbiya Central Headquarters said the Iranian strikes inflicted "significant damage," but US Central Command said none of its assets were hit.
CENTCOM said Iran had used missiles, drones and small boats in the attack, which targeted three Navy destroyers.
The US said it targeted missile and drone sites and other locations in response.
"CENTCOM does not seek escalation but remains positioned and ready to protect American forces," it said in a statement.Iran also said it would respond if attacked.
The renewed hostilities broke out as Washington was awaiting Iran's response to a US proposal that would stop the fighting but leave the most contentious issues, such as Iran's nuclear program, unresolved for now. Iran's foreign ministry spokesperson said Tehran had not yet reached a conclusion on the emerging plan.
The proposal does not address key US demands that Iran suspend its nuclear work and reopen the Strait, which before the war handled one-fifth of the world's oil and gas supply.
The proposed framework would unfold in three stages: formally ending the war, resolving the Strait of Hormuz crisis and launching a 30-day window for negotiations on a broader agreement, according to the sources and officials.
Separately, the US imposed sanctions on Thursday on Iraq's deputy oil minister and three militia leaders over what it said was their support for Iran.
Israel, which has also been fighting Iran-backed Hezbollah in Lebanon, on Thursday said it had killed a Hezbollah commander in an airstrike on Beirut a day earlier, the first Israeli attack on the Lebanese capital since a ceasefire there was agreed to in April.
A halt to Israeli strikes in Lebanon is a key Iranian demand in negotiations with Washington.
Hopes that even a partial peace deal could lead to the reopening of the Strait of Hormuz have already moved markets, with oil prices sliding again on bets that supply disruptions could ease and global stocks largely holding onto record highs.
Iran and the US have scaled back ambitions for a sweeping settlement as differences persist, particularly over Iran's nuclear program - including the fate of its highly enriched uranium stockpiles and how long Iran would halt nuclear work.
Instead, they are working toward a temporary arrangement set out in a one-page memo aimed at preventing a return to conflict and stabilising shipping through the strait, sources and officials said.
Iranian Foreign Minister Abbas Araqchi held a phone call on Thursday with Ishaq Dar, his counterpart in Pakistan, which has taken a leading role in mediation efforts.
"We remain optimistic," Pakistan's foreign ministry spokesman Tahir Andrabi told a briefing in Islamabad when asked how quickly a deal could come.
"A simple answer would be that we expect an agreement sooner rather than later."