Turkey’s prime minister took a combative stance on his closely watched return to the country on Friday. He told his supporters who thronged to greet him that the demonstrations that have swept the country must come to an end.

In the first extensive public show of support since anti-government protests erupted last week, more than 10,000 supporters cheered Recep Tayyip Erdogan with rapturous applause outside Istanbul’s international airport.

Despite earlier comments that suggested he could be softening his stand, Mr. Erdogan delivered a fiery speech on his return from a four-day trip to North Africa. “These protests that are bordering on illegality must come to an end as of now,” he said.

Tens of thousands of protesters have held demonstrations that have spread to dozens of cities across Turkey, sparked by the violent police reaction last Friday to what started out as a small protest against a plan to develop Istanbul’s central Taksim Square.

Since then, three people have died — two protesters and a policeman — and thousands have been wounded. One protester is on life support in a hospital in Ankara.

Protesters from all walks of life have occupied Taksim Square and its park, objecting to what they say is Mr. Erdogan’s increasingly autocratic and arrogant manner of governing charges he vehemently denies.

Mr. Erdogan’s words were at times almost drowned out by his supporters. “God is Great,” they chanted, and soon moved on to slogans referring specifically to the protesters in Taksim Square.

“Let us go, let us smash them,” they shouted. “Istanbul is here, where are the looters?”

Mr. Erdogan had initially referred to the protesters as looters and troublemakers, while also acknowledging that excessive police force might have been used, and promising it would be investigated.

On his return to Istanbul, Mr. Erdogan’s speech, delivered from atop an open-air bus outside the airport terminal, appeared at first to be an attempt to strike a unifying note.

“They say I am the prime minister of only 50 per cent. It’s not true. We have served the whole of the 76 million from the east to the west,” he said at the airport, referring to his election win in 2011, when he took 50 percent of the vote.

“Together we are Turkey. Together we are brothers,” he said, adding “We have never endeavoured to break hearts. We are in favour of mending hearts.”

But he soon became more combative.

“We have never been for building tension and polarization. But we cannot applaud brutality,” he said.

In his last speech in Tunisia before flying to Istanbul, Mr. Erdogan had said that terrorist groups were involved in the protests, saying they had been identified.

In a twist, Mr. Erdogan implied that bankers were also part of a conspiracy that was fuelling the protests. He added that the fans of dissent had been fanned by other groups too.

“Those who call themselves journalists, artists, politicians, have, in a very irresponsible way, opened the way for hatred, discrimination and provocation,” he said.