Anti-government protesters in Bahrain cheered and moved back into the capital's main square on Saturday as the military pulled back after two days of violence that wounded hundreds and killed five.

Tens of thousands of protesters have gathered in Manama's Pearl Square, defying government bans on demonstrations to stage rallies across the Middle East like those held in Egypt, Libya and Iran.

Bahrain's crown prince gave the orders for the military withdrawal, and said police would now be responsible for the square.

King Hamad bin Isa Al-Khalifa's monarchy said it's hoping to negotiate with the protesters calling for him to step down.

After the military left, Bahraini police briefly fired tear gas at protesters, witnesses reported, in an attempt to regain control of the Pearl Square area. The riot police left the square soon after.

Martin Chulov of Britain's The Guardian newspaper told CBC News from Manama that, within minutes of learning the square was clear, thousands of people began streaming back to the site.

"There would be 40,000 people at least, people re-pitching tents, and claiming some sort of a victory."

Chulov said it appears that all sides have agreed to regroup and come up with some form of dialogue if possible.

"The military have left the streets, the protesters have retaken their token site, and we'll see where this leads," he said.

Ibrahim Sharif, head of the Waad Society, an umbrella group of protest factions, said negotiations will not be held until the government guarantees protesters can stage rallies without being attacked.

Protesters had only called for the Sunni monarchy to weaken its hold on top government posts when the protests began last Monday, but after several protesters were killed, many are calling for a complete revolution.

At least 50 people were injured in Friday's shooting. On Thursday, five people were killed and at least 230 were injured when riot police fired birdshot into crowds at a protest encampment.

Eugene Rogan, director of Oxford University's Middle East Centre, said the monarchy's decision to pull the military was "significant," but the true test will be what happens to protestors who go back to Pearl Square.

"There is a real balance being struck here," Rogan said.

"Either you use force and keep using it until you intimidate people into accepting your rule, or else you start making concessions and then go down the path to having a revolution." The Canadian and U.S. governments have called for peaceful negotiations in Bahrain.