Egyptian troops have sealed the border with the Gaza Strip, ending 12 days of freedom of movement for Palestinians.
The troops are still allowing Palestinians and Egyptians to return home, but have stopped allowing any new cross-border movement.
The border was breached when Hamas militants blew up sections of the wall to break Israel's seven-month blockade.
An estimated half of Gaza's 1.5m population took the opportunity to cross into Egypt and buy supplies.
Egyptian forces came early on Sunday morning with metal barriers and rolls of barbed wire to close the only remaining gap in their side of the border.
Troops patrolled in armoured cars and stood on rooftops as the border was resealed.
Meanwhile, dozens of armed and helmeted Hamas militants wielded batons at crowds seeking opportunities to cross over from the Gazan side of the border.
"It is closed. Go home," said one of the Hamas fighters, as the crowd gradually dwindled.
The closure followed talks between Hamas and Egyptian officials on Saturday, after which Hamas said it would co-operate with Egypt to restore control of the border.
17 January: Israel seals border following rise in rocket attacks
20 January: Gaza's only power plant shuts down
22 January: Israel eases restrictions
22 January: Egyptian border guards disperse Palestinian protest against closure
23 January: Border wall breached
"We have concluded an agreement between us and our brothers in Egypt to operate channels at the local level at the crossing and along the border," said Hamas leader Mahmoud Zahar.
Under the terms of the agreement, some Gazans who have already travelled into Egypt for medical treatment will be allowed to stay temporarily.
Others who wish to do so will be allowed to travel to a third country.
Meanwhile, Egypt arrested 15 Palestinians armed with weapons and explosives in the Sinai peninsula.
Israel has said it is concerned that militants have been taking advantage of the freedom of movement to bolster their stores of weapons and explosives.
Earlier this week, Egypt and the Palestinian Authority, which controls the West Bank but not Gaza, endorsed a 2005 plan for EU and Israeli monitors to prevent cross-border smuggling.
Although there is widespread sympathy for the Palestinians in Egypt, and closing the crossing will not be popular, Cairo had come under Israeli and US pressure to clamp down on potential arms smuggling routes, the BBC's Ian Pannell in Cairo says.
But the border's long-term future remains uncertain, with Egypt attempting to reconcile Israeli demands for the crossing to be permanently closed with Hamas demands for it to be open, he says.
Hamas is opposed to EU or Israeli involvement in the running of the border, but says it is flexible about its own role there.