by Victor Kotsev, Special for USA TODAY

by Victor Kotsev, Special for USA TODAY

ISTANBUL â?? Turkey's government is working on legislation to restrict the use of Twitter and other social media, blamed for the worst unrest the country has experienced in decades.

The Turkish justice ministry is putting together a bill on Internet crime, which will also include sections on social media, according to local media.

"In the end, I think it will be quite futile," said Roy Karadag, an analyst specializing in Turkey at the Institute for Intercultural and International Studies at the University of Bremen.

"Turkey has done a lot to create the image of being the most democratic, Islamic society in the Middle Eastern region and now it is behaving like Iran or Saudi Arabia or like Egypt under Mubarak and under the Muslim Brotherhood," he said.

Turkish Prime Minister Recep Tayyip Erdogan on Tuesday defended the nation's police and vowed to increase their powers to deal with unrest. Riot police were again deployed in Turkey's two main cities of Istanbul and Ankara. Thousands have flooded the streets nightly, many honking car horns and waving Turkish flags.

Police early Tuesday carried out raids at homes and offices, detaining at least 87 people suspected of involvement in violence. Overnight police broke up a silent protest at Taksim Square by hundreds mimicking a lone man who stood silently for hours in a passive anti-government protest.

Addressing legislators of his Islamic-rooted Justice and Development Party, Erdogan said riot police deployed to disperse protesters had acted with restraint and said their powers would be increased, allowing them more leeway in dealing with future protests.

"Our security forces put up a successful and extremely patient struggle against the acts of violence, by remaining within the limits set by democracy and the law," Erdogan said.

Since the protests began at the end of May, Erdogan has lashed out at social media, calling it a "troublemaker in societies" and criticizing lies he says have been spread by people using Twitter.

Protesters in Turkey are not the first to make use of social media such as Facebook, Twitter and YouTube. During the demonstrations of the Arab Spring, activists used the sites as a means of organizing themselves as they toppled the dictators leading their countries.

Recognizing the threat social media poses, Turkish authorities have shut down social networking sites for several hours at a time in a bid to prevent protesters being able to share images and information as well as imposing news blackouts.

"We have a study on those who provoke the public via manipulations with false news and lead them to actions that would threaten the security of life and property by using Twitter, Facebook or other tools of social media," Turkish Interior Minister Muammer GÃ¼ler was quoted in the Turkish paper, the Hurriyet Daily News, as saying on Monday.

"Still, we think that the issue needs a separate regulation," he added.

The Turkish government has struggled to rein in protests over the last few weeks following what began as a peaceful movement to save Istabul's Gezi Park from demolition to make way for a commercial development.

The demonstrations have since turned violent with more than 7,500 people injured and at least four killed as police tried to quell the protests using tear gas and water canons. Dozens have also been arrested as part of raids carried out on Tuesday in a bid to prevent further protests.

"Maybe later if the government continues to oppress us, people will go out again," said Yasin Keskin, a protester. "They (the government) don't admit it, but I think we broke something in them. I think they are so aggressive because they are afraid."

Analysts say the protests are no longer about the park.

"The prime minister has managed to turn what was a small sit-in style environmental protests into a referendum on his rule," said Aaron Stein, an analyst at the Center for Economic and Foreign Policy Studies in Istanbul.

"Even before the protests, Erdogan did not have the support from his party for his presidential ambitions, underscoring the potential political pitfalls that await Turkey's powerful prime minister once order is restored," he added.