The Egyptian military on Wednesday foiled an attempted attack on a watchtower on the Rafah border crossing with the Gaza Strip.

Egyptian security forces safely detonated 50 kilograms of explosives laid out by terrorists intending to destroy the watchtower, which was manned by Egyptian border police, Egyptian military spokesman Ahmed Ali said.

The foiled attack came as Israel announced it had finished building a fence on its border with Egypt, meant to keep out both African migrants and terrorists.

Egyptian military and police forces in Sinai have been the subject of several deadly attacks by Islamic groups, whom authorities suspect have ties to Hamas, the terror group that controls Gaza.

In October, Egyptian security officials warned that the military had drafted plans for attacking targets in the Gaza Strip, which were to be carried out should there be an escalation in violence against Egyptian forces in Sinai by terror groups operating from the Hamas-controlled Palestinian territory.