The remarks alluded to the death of an Eritrean migrant who was mistaken for a second attacker in the incident. Abtom Zarhom, 29, was shot by a security guard and then beaten by a mob. He later died of his injuries. Video of the incident was broadcast on Israeli television, stoking already-high tensions.
"A crowd who finds himself at the site (of an attack) should evacuate the area and let the emergency services do their job," Netanyahu said in remarks Monday.
Israel is "a country of law. No one will take the law into his own hands. That's the first rule," he said.
The gunman killed an Israeli soldier and wounded 10 more people before police shot him dead.
"We are in a continued struggle," Netanyahu said, adding that "this thing sometimes creates friction between citizens in the locations of the attacks."
Though the attack in Beer Sheva comes at a time of increased violence between Israelis and Palestinians, it isn't clear if the gunman was motivated by those tensions.
The gunman, Mohannad Al-Oqbi, was an Arab Bedouin citizen of Israel. Bedouins are their own ethnic subgroup, and some, but not all, Bedouins identify as Palestinian.
Beer Sheva is located in Israel and not in Palestinian territory.
Police have not discussed a motive, but some Bedouin groups have been at odds, at times violently, with Israeli authorities over issues of their own, according to the website of the Knesset, Israel's parliament.
As the Eritrean man lay on the ground bleeding, people rattled by the shooting kicked and beat him and hit him with a bench, cell phone video showed.
Snatches M16 rifle
The shooting attack on Sunday began when Al-Oqbi, 21, shot Israeli soldier Sgt. Omri Levi, 19, point-blank with a pistol, police said.
Al-Oqbi then snatched the soldier's military rifle, an M16, and opened fire with it in the crowd, injuring 10 more people before police killed him, said Israeli police spokesman Micky Rosenfeld.
People scrambled and ducked for safety from the gunman, security camera video authenticated by Israeli police showed. The Eritrean man shuffled on all fours among them, and had rounded a kiosk when the security guard ran toward him and opened fire with a handgun, the security video showed.
Israeli police condemned the beating, which it said rendered the victim unrecognizable. Police spokeswoman Luba Samri said there would be an investigation to determine who was involved.
"It should be noted that the police see this in a very severe light and will not allow people to take the law into their hands, and everyone should act with restraint and carefulness and allow the police to do their job," Samri said.
Al-Oqbi was from the town of Hura, which is near Beer Sheva in the Negev desert. Authorities have also arrested a member of his family on suspicion of helping him, Samri said.
Bedouins are a traditionally nomadic Arabic-speaking people in the Middle East. In Israel, they hold citizenship, but some have clashed with authorities over policies to settle them in cities
Some Bedouin settlements have gained recognition as towns, but some have not been recognized and have been condemned to demolition, according to the Knesset website.
This has led to tensions between some groups of Bedouins and the Israeli government. On the other hand, tensions between Israelis and Palestinians have led Bedouins to "strengthen their Palestinian identity," according to the Knesset website.
Protesting Bedouins sometimes carry Palestinian flags.
The Beer Sheva violence comes as Palestinians and Israelis have shed blood for weeks, mostly in Palestinian territories and neighborhoods.
On Sunday, four Palestinians were injured by live fire in the West Bank, according to a spokesman for the Palestinian Health Ministry.
Seven Israelis have been killed since October 1 in attacks by Palestinians with knives, guns and cars, according to Israeli officials.
Protesters have rioted in Palestinian territories, many throwing rocks, and at times Israeli security forces have used live ammunition.
At least 44 Palestinians have been killed this month in Jerusalem, Gaza and the West Bank, Palestinian Authority Health Ministry spokesman Osama al-Najjar told CNN. This figure includes those killed after carrying out attacks.
This is in addition to the more than 1,770 injured by live fire or rubber bullets in the same time period, according to Najjar.
Both sides have traded blame about who is responsible for the ongoing violence. Both sides have turned up gruesome video recordings to support their claims.