Hamas said the gunmen were attacked from the air near Gaza City.
The army said the gunmen were approaching IDF troops operating near the Gaza-Israel border when the aircraft opened fire.
Also Friday morning, a Kassam rocket fired from Gaza landed in the western Negev. No one was wounded and no damage was reported.
The IDF has been recently carrying out regular operations against Gaza terrorists in an effort to stop Palestinian rocket attacks on southern Israel.
Also Friday morning, the IDF reported that six Palestinians had been arrested in the Nablus area on suspicion of involvement in a shooting rampage in Samaria in which a soldier and a civilian were wounded.
The Palestinian Ma'an news agency said that among the detainees were three brothers, all Fatah operatives. Wednesday's attack began at the Ariel junction, where terrorists sprayed a hitchhiking post with bullets from 100 to 150 meters away before speeding down a busy road while firing at passing cars.
Overnight Thursday, the IDF killed three Palestinian terrorists in the Gaza Strip.
In the northern part of the Strip, a force from the Golani Infantry Brigade spotted a group of gunmen. Two members of the group were killed in the exchange of fire.
Two IDF soldiers were lightly hurt in the violence, and were taken to Soroka Hospital in Beersheba for treatment.
In the southern part of the Gaza Strip, a unit of reserve troops shot and killed an Islamic Jihad gunman. There were no casualties among the reservists.
Meanwhile, two Kassam rockets were fired overnight Thursday; both landed in open fields, inflicting no injuries or damage.
Overall, IDF troops arrested 14 Palestinian terror suspects in the West Bank.
Nine of the suspects were nabbed in Nablus, the military said in a statement. The others were caught in Ramallah and in Jenin.
All the detainees were transferred for interrogation.