Turkish police have detained at least 20 people allegedly involved in violent protests, as the prime minister continued to lash out at protesters – and a BBC journalist – he claimed were part of a conspiracy to harm Turkey.

Police searched about 30 addresses in the capital, Ankara, and rounded up 20 people with alleged links to "terror" groups and suspected of "attacking police and the environment" during three weeks of protests that have swept Turkey, the state-run Anadolu agency reported. It was the second police sweep against demonstrators in the city this week.

The prime minister, Recep Tayyip Erdoğan, holds unspecified foreign forces, bankers and media outlets responsible for the protests that began in Istanbul on 31 May following a heavy-handed police clampdown on peaceful activists. The protests quickly spread to other cities, with thousands expressing discontent with what critics have said is Erdoğan's increasingly authoritarian way of governing.

In an address to members of his Islamic-rooted party in parliament, Erdoğan reiterated that the protests were orchestrated by forces wanting to prevent Turkey's rise. He repeated his claim that the same conspiracy was at work in Brazil, saying both countries had paid off debts to the International Monetary Fund.

Mass rallies in Brazil were set off this month by a 10-cent hike in bus and subway fares in São Paulo, Rio de Janeiro and elsewhere. The protests soon moved beyond that issue to tap into widespread frustration over a range of issues, including high taxes and woeful public services.

"From the start, some people, internally and externally, have tried to portray the protests as totally innocent and just, and the police as having systematically used force," Erdoğan said. "Certain media in Turkey were lead provocateurs. The foreign media took part in these operations."

He targeted a Turkish BBC reporter who tweeted about a forum held by protesters, where participants reportedly suggested a six-month boycott of goods that they said would help slow down the economy. Without mentioning her by name, Erdoğan accused Selin Girit of being "part of a conspiracy against her own country".

"Their aim is to prevent democracy, to harm Turkey's economy, to hit tourism," Erdoğan said.

The Turkish prime minister, Recep Tayyip Erdoğan, who said a conspiracy was behind recent protests in Turkey and Brazil. Photograph: Adem Altan/AFP/Getty Images

Two days earlier, Ankara's mayor had accused Girit of being a British government agent and started a campaign on Twitter apparently to try to discredit her, prompting the BBC to issue a statement on Monday saying: "It is unacceptable for our journalists to be directly targeted this way."

On Monday, the US president, Barack Obama, spoke with Erdoğan for the first time since the protests began. The two leaders discussed "the importance of nonviolence and of the rights to free expression", the White House said. It said they also discussed the right of assembly and a free press.