WASHINGTON — The United States Navy sent a destroyer toward the Persian Gulf on Tuesday after Iran took control of a Marshall Islands-flagged cargo ship it accused of trespassing in territorial waters, American military officials said.

The ship, the Maersk Tigris, with 24 crew members, was intercepted by Islamic Revolutionary Guards Corps patrol boats on Tuesday morning while traveling through the Strait of Hormuz, a Pentagon official said. The Iranian forces fired shots across the ship’s bow, the official said, after its captain declined an order by the forces to divert farther into Iranian waters.

The official said the ship was traveling through “an internationally recognized maritime route.” After being fired on, it issued a distress call, prompting the United States Navy to direct a destroyer, the Farragut, to the area and to put aircraft on standby to monitor the situation.

The episode threatened fragile negotiations over reining in Iran’s nuclear ambitions, but American officials were quick to play down its significance, correcting initial reports out of Iran that it had seized a United States ship. The Marshall Islands, in the Pacific, have been independent of the United States since 1986 but have a “free association” relationship with the country.