The U.S. official, speaking on condition of anonymity, said the USS Thunderbolt fired the warning shots after the Iranian vessel approached at a high rate of speed and ignored radio calls, flares and the ship's whistle. The Thunderbolt was accompanied by several U.S. Coast Guard vessels.
The Iranian vessel appeared to be from Iran's Islamic Revolutionary Guard Corps, the official said, adding that it was armed but that the weapons were unmanned.
The Islamic Revolutionary Guard Corps and Iranian Foreign Ministry could not immediately be reached for comment.
Years of mutual animosity had eased when Washington lifted sanctions on Tehran last year as part of a deal to curb Iran's nuclear ambitions. But serious differences remain over Iran's ballistic missile program and conflicts in Syria and Iraq.
The Trump administration, which has struck a hard line on Iran, recently declared that Iran was complying with its nuclear agreement with world powers, but warned that Tehran was not following the spirit of the accord and that Washington would look for ways to strengthen it.
During the presidential campaign last September, Trump vowed that any Iranian vessels that harass the U.S. Navy in the Gulf would be "shot out of the water."
Such incidents occur occasionally. In January, a U.S. Navy destroyer fired three warning shots at four Iranian fast-attack vessels near the Strait of Hormuz after they closed in at high speed and disregarded repeated requests to slow down.
More about: #Iran