In a statement, the US Navy said that at 2100 GMT, an Iranian naval vessel had approached the Marshall Islands-flagged oil tanker TRF Moss in international waters in the Gulf of Oman.
"The Iranian vessel departed the scene when US Navy guided-missile destroyer USS McFaul arrived on station," the statement said, adding that the Navy had deployed surveillance assets including maritime patrol aircraft.
The Navy said that around three hours later it received a distress call from Bahamas-flagged oil tanker Richmond Voyager while the ship was more than 20 miles (32 km) off the coast of Muscat, Oman, and transiting international waters.
"Another Iranian naval vessel had closed within one mile of Richmond Voyager while hailing the commercial tanker to stop," the Navy statement said, adding that the McFaul directed course towards the merchant ship at maximum speed.
"Prior to McFaul’s arrival on scene, Iranian personnel fired multiple, long bursts from both small arms and crew-served weapons," the Navy said.
"Richmond Voyager sustained no casualties or significant damage. However, several rounds hit the ship’s hull near crew living spaces. The Iranian navy vessel departed when McFaul arrived."
US oil major Chevron confirmed that it managed the Richmond Voyager, that crew onboard were safe and the vessel was operating normally.
The TRF Moss' manager is listed in public database Equasis as Singapore-based Navig8 Chemicals Asia, but Navig8 told Reuters it was not connected with the tanker. The vessel's manager could not be immediately located.
Iran's state news agency IRNA said on Wednesday that Iranian authorities have not commented yet on the matter.
"The United States will respond to Iranian aggression together with our global allies and our partners in the Middle East region to ensure the freedom of navigation through the Strait of Hormuz and other vital waterways," a spokesperson for the White House National Security Council said.
Vice Admiral Brad Cooper, commander of US Naval Forces Central Command, cited the exceptional effort by the McFaul crew for immediately responding and preventing another seizure.
Since 2019, there has been a series of attacks on shipping in strategic Gulf waters at times of tension between the United States and Iran.
Iran seized two oil tankers in a week just over a month ago, the US Navy said.
"Since 2021, Iran has harassed, attacked or seized nearly 20 internationally flagged merchant vessels, presenting a clear threat to regional maritime security and the global economy," the Navy statement added.
About a fifth of the world's supply of seaborne crude oil and oil products passes through the Strait of Hormuz, a chokepoint between Iran and Oman, according to data from analytics firm Vortexa.
Refinitiv ship-tracking data shows the Richmond Voyager previously docked in Ras Tannoura in eastern Saudi Arabia before Wednesday's incident in the Gulf of Oman.
The Richmond Voyager was now leaving the Gulf with Singapore listed as its destination, Refinitiv ship tracking showed.
Top ship registries including the Marshall Islands and Greece have warned in recent weeks of the threat to commercial shipping in the Gulf including the Strait of Hormuz.
In another point of tension, the U.S. confiscated a cargo of Iranian oil aboard a tanker in April in a sanctions enforcement operation, sources told Reuters.
That vessel, the Marshall Islands-flagged Suez Rajan, is anchored outside the U.S. Gulf of Mexico terminal of Galveston waiting to discharge its cargo, according to Refinitiv ship tracking.