Stranded Palestinians in Egypt looking to return home to the Gaza Strip will be able to do so for the first time in more than a month Wednesday after the Egyptian government temporarily reopened a border crossing in Rafah, according to media reports. The crossing had been shuttered amid an uptick in attacks in the Sinai peninsula that Egypt said were aided by militants using the crossing to smuggle weapons and materials. The reopening of the border crossing on Wednesday and Thursday will not allow Palestinians in Gaza to cross into Egypt, the head of the crossing on the Gaza side told the Associated Press.

Egypt started destroying houses on the border to create a barrier and stop militants from using underground tunnels on the Gaza border. The move was criticized by people in Sinai who said the tunnels were used to transport goods that benefited the local economy, according to Reuters.

The buffer zone was coupled with the closure of the Rafah crossing in late October to stem the attacks. An ambush near Rafah led to 31 Egyptian soldiers being killed on Oct. 24, according to the Associated Press. Another 33 Egyptians were killed the next day in Sinai, and the two incidents were among the most deadly attacks in Egypt since Mohamed Morsi, Egypt’s Muslim Brotherhood-backed elected president, was ousted in July 2013, Reuters reported. Earlier this month, Egyptian soldiers and police were killed in separate attacks.

About 6,000 Palestinians are believed to be stranded in Egypt, according to Reuters. Another 1,000 Gazans are seeking to cross the border to receive medical treatment in Egypt. Palestinians in Egypt can cross into Gaza between 5 p.m. and 9 p.m. EST on Wednesday and between 12 p.m. and 9 p.m. EST on Thursday.

The violence in Sinai surged after Morsi, an Islamist, was ousted in a coup.