Palestinian security forces have sealed Gaza's border with Egypt, which thousands have crossed illegally in the past week.
Gaps in the Gaza-Egypt border have been blocked
"The chaos that existed here is over," Palestinian leader Mahmoud Abbas said after touring the area on Sunday.
The Israeli troops that had secured the border withdrew on Monday, prompting Palestinians to stream into Egypt.
But over the weekend, Palestinian and Egyptian troops moved to restore order and block holes in the frontier fence.
Although most Palestinians who crossed into Egypt to shop and see relatives, Palestinian officials say the recent border chaos enabled smugglers to bring drugs and weapons into Gaza.
"We have closed all the holes and gaps," Mr Abbas said. "The situation is now stable."
The Palestinian leader added that new equipment, including metal detectors, was being installed.
Only those returning home are currently allowed to cross the border.
Mahmoud Abbas tested the new equipment at the Rafah crossing
Hundreds of Palestinians hoping to go back to Gaza scuffled with Egyptian police trying to control the flow of people, Reuters news agency reported on Sunday.
"We are very sad and frustrated," Ibrahim Radwan, a Gaza resident waiting to return home, told the agency.
"We want to come and go freely."
On Saturday Palestinian border troops clashed with Gazans attempting to cross into Egypt.
Gaza is a stronghold of Hamas and other militant groups.
Analysts say the sense of lawlessness that has prevailed in the wake of the Israeli withdrawal from Gaza is a key test for Mr Abbas' administration, which is trying to assert its authority.