Gaza: Israeli forces killed two Palestinian militants near a border crossing with the Hamas-controlled Gaza Strip on Thursday, medical workers and militant groups said.

Gunmen from al-Aqsa Martyrs Brigade, an armed wing of Palestinian President Mahmoud Abbas's Fatah faction, and another militant group attacked an Israeli army position near the Erez crossing in the northern Gaza Strip, the groups said.

An Israeli army spokeswoman said troops crossed into Gaza after seeing militants planting explosive devices near the border fence. The troops shot two of the militants, she said.

The army reopened the terminal shortly after the attack.

The militants killed were from al-Aqsa Martyrs Brigade and the Democratic Front for the Liberation of Palestine, the groups said.

Israel said on Wednesday it would support efforts by Egypt to reach a truce in the Gaza Strip but instructed the army to prepare for possible military action in the territory if mediation failed.