FILE PHOTO: A staff member removes the Iranian flag from the stage during the Iran nuclear talks at the Vienna International Center in Vienna, Austria July 14, 2015. REUTERS/Carlos Barria/File photo

DUBAI (Reuters) - Iran’s air defenses have forced an approaching U.S. spy plane and a reconnaissance drone to change course near its air space over the past six months, a military official was quoted as saying on Sunday .

Brigadier General Farzad Esmaili, commander of the Iran’s air defense force, said an unmanned RQ-4 drone was intercepted last week and a U2 spy plane was warned away in March, the semi-official Fars news agency reported.

“When the warning was given to the pilot of this (U2) plane at the Strait of Hormuz, he knew that he was being targeted by two separate radars ... and missile systems,” Esmaili said.

“Iran will never allow such hostile planes to approach its airspace and would not hesitate to bring them down if necessary,” said Esmaili, quoted by the Tasnim news agency.

U.S. officials have frequently complained of what they call unsafe and unprofessional interactions by Iranian maritime forces in the Gulf this year. Iran has said its forces act within their rights to protect Iranian territorial waters.

The Trump administration has recently struck a hard line on Iran, accusing Tehran of violating the spirit of an accord with world powers that lifted sanctions and sought to curb The Islamic Republic’s nuclear program.