A group of Turkish activists hacked into the Twitter account of a top adviser to Prime Minister Recep Tayyip Erdogan, posting messages of solidarity with a teenage boy who recently died as a result of injuries sustained during mass protests last summer.

The Twitter account of Mustafa Varank, one of Erdogan’s top political advisers, was hacked Wednesday, Hurriyet daily reports.

Many messages posted on the hijacked account memorialized Berkin Elvana, a 15-year-old teenager who died Tuesday after being in a coma for 269 days. Berkin was struck in the head by a teargas canister during the now infamous Gezi park protests that gripped Istanbul in June. Berkin was not taking part in the protest, but was rather a passerby.

Varank’s Twitter cover was changed to Elvan’s portrait, and several posts accused Erdogan of being responsible for the boy’s death.

“We know who Elvan’s killer is,” read one of the messages, which also included a photograph of Erdoğan with the inscription: “I gave the instructions to the police.”

Varank, who is known for embracing social media, regained control of his account several hours later.

“After voyeurism, montage and blackmail, they have also started to steal accounts. I think I have succeeded to get my account back. I apologize to my followers,” Varank tweeted.

On Wednesday, clashes between police and protesters continued in the Turkish cities of Ankara and Istanbul, where riot police fired tear gas and used water cannons to disperse crowds of people.

In Istanbul, where in late afternoon tens of thousands of demonstrators, many chanting political slogans, gathered for Elvan’s funeral, police used force to clear Taksim Square. Clashes started in Osmanbey neighborhood near the Square right after the service at the cemetery. The rallies followed similar gatherings across Turkey on Tuesday after Elvan’s death was announced by his family.

In Ankara's central Kizilay Square crowd of several thousand demonstrators also protested the teenager’s death. Like in Istanbul, police fired tear gas and water cannons.

The rallies followed similar gatherings across Turkey on Tuesday after Elvan’s death was announced by his family.

More demonstrations are planned to ratchet up pressure on Erdogan in the run up to the March 30 election. Nationwide protests and a snowballing corruption scandal have proven to be the largest threat to Erdogan’s ruling Justice and Development Party (AKP), which has been in power since 2002. Erdogan has blamed social media as being at least partially responsible for his political headaches.

On Wednesday, Erdogan said that holding massive streets protests 18 days before elections was against the spirit of democracy.

"Trying to set fire to the streets 18 days before elections is not a democratic stance," Erdogan told a campaign rally in the southeastern city of Mardin, Reuters reports.

"I appeal to employers' organizations, trade unions and NGOs who are provoking incidents to show responsibility. Whoever has problems should solve them at the ballot box on March 30."

The Turkish PM has long had an adversarial relationship with the tech-savvy urbanites who form the backbone of the opposition to his government. Days after protesters took over Istanbul’s central Taksim Square following violent clashes with police in June 2013, Erdogan called Twitter a “menace.”

"The best examples of lies can be found there. To me, social media is the worst menace to society."

But his ire with social networks reached fever pitch when a Twitter user named Haramzadeler, or ‘Sons of Thieves,’ used multiple web-based platforms to leak information pointing to graft and corruption in the prime minister’s inner circle.

Ergodan responded by threatening to shut down YouTube and Facebook.

“There are new steps we will take in that sphere after March 30... including a ban," Erdogan said. "We are determined on this subject. We will not leave this nation at the mercy of YouTube and Facebook."

Many analysts, however, believe social media has filled the vacuum left by Turkey’s media, which has allegedly been stifled during Erdogan’s 11 years in power.

In February, a journalist from Azerbaijan was deported for a series of tweets that accused Erdogan of corruption and claimed he was “destroying the Turkish democracy he built.”

Apart from alleged crackdowns on local media, Erdogan has also targeted western media outlets, which he has often accused of being “foreign conspirators” attempting to destabilize the country.