One ended after a U.S. ship fired warning shots to deter the Iranian vessel .