A US Navy ship fired warning shots at an armed Iranian patrol boat Tuesday in the northern end of the Persian Gulf, according to two US defense officials.