Bulgarian President Rumen Radev called on Saturday for a resignation of the "mafia-type" conservative government, which he blamed for ordering police raids on his offices this week.

The president's legal affairs and anti-corruption secretary and his security and defence advisor were detained for questioning on Thursday and their offices searched as part of two separate probes into influence-peddling and disclosure of state secrets.

The searches sparked public anger and brought thousands of demonstrators onto the streets of Sofia to condemn the raids as an attack by the government and the chief prosecutor against the Socialists-backed Radev, rather than on the real oligarchs.

The president is an outspoken critic of the cabinet of Prime Minister Boyko Borisov, accusing it of "links with oligarchs".

"Turning the government into a mafia-type structure has pushed freedom-loving Bulgarians of all ages, regardless of their political affiliations, to raise demands for respect of the law," Radev said in a televised address to the nation.

Protesters out on the streets of Sofia Saturday
Protesters out on the streets of Sofia Saturday AFP / NIKOLAY DOYCHINOV

"There is only one way out of the current situation -- resignation of the government and the prosecutor general," he added.

An "anti-mafia consensus" is forming in the country, out of anger built up by years of "corruption, incitement of fear, prosecution racketeering and inaction against plunder, and trampling upon the presumption of innocence," Radev said.

"Europe has no right to look away from Bulgaria. The European Union needs a democratic Bulgaria," he added.

A protester is detained by police during an anti-government rally
A protester is detained by police during an anti-government rally AFP / NIKOLAY DOYCHINOV

Borisov went live on social media late Saturday to appeal for calm, urging the protesters to respect the police and "not shed blood".

He said he would "stay in power" citing the need for stability as "the world enters into its most horrible crisis"

The searches this week have been seen by the opposition and observers as an attack against the president.

Eighteen people were arrested, and two protesters and four police officers injured as a second night of protests on Friday evening turned violent.

One of the president's advisers has been charged with "trading in influence" for having acted as an intermediary between a businessman and the president, another for "disclosure of state secrets".

On Saturday, hundreds of people invaded a small beach on the Black Sea to protest against the perceived impunity of high-ranking officials who broke the law.

The Black Sea coast is public property but access to the beach has been cut as it is hear an estate used by the leader of a small liberal party that quietly backs Borisov.

This brought even more people onto the streets, blocking traffic on major downtown boulevards in the capital Sofia for hours. Smaller rallies were held in three other cities.

Protesters shouted "Mafia", "Killers" and "Resign" and threw water bottles and fireworks at police, injuring one officer.

The US embassy in Sofia meanwhile issued a rare security alert for travellers to avoid areas affected by the protests anticipated to "continue until at least July 16, 2020."

Bulgaria is ranked, by Transparency International, as the most corrupt of the 27 nations in the EU.