Authorities believe they have now recovered the bodies of all the workers who perished in the Soma mine.
(CNN) -- Turkish authorities have detained 25 people in connection with last week's coal mine fire in Soma that killed 301 miners, Turkish prosecutor Bekir Sahin told reporters Sunday.
Of those detained, three have been indicted, the prosecutor said.
The search for victims of Tuesday's fire ended Saturday. Authorities believe they have now recovered the bodies of all the workers who perished.
The investigation into what caused the deadliest disaster in Turkish mining history continues, the Natural Disaster and Emergency Coordination Directorate said.
The final bodies were pulled out Saturday afternoon, Turkish Energy Minister Taner Yildiz said.
However, as the recovery effort comes to an end, controversy over Prime Minister Recep Tayyip Erdogan's response to the tragedy refuses to blow over.
On Friday, police in Soma used tear gas, plastic pellets and a water cannon on protesters angered by the government's response.
The protesters, dressed mostly in black, chanted "Don't sleep, Soma, remember your dead!" as they passed through city streets a few miles from the disaster site trying to reach a statue honoring miners.
Amid a rising tide of discontent, local authorities have banned protests in Soma and apparently clamped down on those taking part.
Lawyers' representatives told Turkish broadcaster DHA that eight lawyers and 25 other citizens were detained Saturday. The lawyers were in town to try to help represent families of the dead miners.
Abdurrahman Savas, the governor of Manisa province, where Soma is located, declined to say how many people had been detained over the protests.
But he told reporters that the authorities decided Friday to ban rallies and demonstrations in Soma to maintain peace and security.
"This is not to prevent freedom of expression," he said.
Distrust of the government is running high in certain sectors of society, with some voicing doubts about the official count of those missing, while others question the fact no one has yet taken responsibility for the tragedy.
Some are also critical of the authorities' use of tear gas and the water cannon against demonstrators.
Public anger has been fueled in part by Erdogan's own missteps while visiting the scene of the disaster Wednesday.
First, Erdogan's comments to relatives of dead and injured miners, in which he described the disaster as par for the course in a dangerous business, were seen as highly insensitive and drew scathing criticism.
Then video taken on the same day in Soma showed Erdogan telling a man "don't be nasty," according to the footage aired Friday by DHA. The remarks initially reported and translated by DHA were confirmed by a CNN native Turkish speaker.
"What happened happened. It is from God. ... If you boo the country's prime minister, you get slapped," Erdogan is heard saying.
That was after another video clip emerged showing a crowd outside a grocery store angrily booing Erdogan. As the Prime Minister entered the crowded store, he appeared to put his arm around the neck of a man who was later identified as a miner.
After the confrontation, the video captured what appeared to be Erdogan's security guards beating the same man to the floor. The miner said later that Erdogan slapped him, possibly by mistake. He wants an apology for the way he was treated by the Prime Minister's staff.
In addition, a photograph of an aide to Erdogan kicking a protester surfaced Wednesday, an image that quickly became a symbol of the anger felt by many against the government, and amid mounting questions over safety practices at the mine.
Huseyin Celik, a spokesman for the ruling Justice and Development Party, dismissed the grocery store incident and said the image of the aide, Yusuf Yerkel, kicking the protester was misleading.
Yerkel was quoted by Turkey's semiofficial Anadolu news agency Thursday as saying that he had been deeply saddened by the previous day's events. "I am sad that I could not keep my calm in the face of all the provocation, insults and attacks that I was subjected to that day," he reportedly said.
Questions over safety chambers
The mine complex exploded in flames for unknown reasons Tuesday, trapping many miners deep underground.
Among other issues, mine officials indicated Friday that workers may not have had access to an emergency refuge where they could have taken shelter from the flames and choking fumes.
Site manager Akin Celik told reporters that the mine had closed one emergency refuge when excavation work moved to a lower area. Miners were building a new safety chamber at the lower level but had not finished, he said.
The owner of the company, Alp Gurman, said the mine met the highest standards laid out by the law in Turkey. The company, he said, had no legal obligation to build safety chambers.
Asked about that issue, Minister of Labor and Social Security Faruk Celik defended Turkey's workplace safety act and said it was set up within the framework of EU regulations, according to CNN Turk.
"This is a dynamic area," he said, adding that it is the duty of each company to ensure workers' safety needs are met. "Could people be sent to death because a certain sentence is not in the regulations?" he asked.
Istanbul Technical University said it had dropped Gurman and a fellow Soma Holding manager, Ismet Kasapoglu, from an advisory panel in its mining faculty, following protests and an occupation by students at the university, CNN Turk reported.
Initial reports said the main fire was sparked by a transformer explosion, but Celik told reporters Friday that the cause of the fire was still unknown.
Asked what had happened, he said: "We don't know either. Never seen anything like this before. We are trying to find out."
Hundreds also took to the streets last week in anti-government protests in Istanbul and Ankara, with police answering, in some cases, with water cannons and tear gas.
As Erdogan took a stroll through Soma, onlookers showered him with deafening jeers as well as chants of "Resign, Prime Minister!"
Foreign Minister Ahmet Davutoglu defended Erdogan in an interview with CNN's Christiane Amanpour on Thursday.
"He was feeling all these pains in his heart," he said. "Everybody knows that our Prime Minister is always with the people, and always feels the pain of the people. Otherwise, he wouldn't get such a high support in eight elections in (the) last 10 years."
But the disaster opened up an old political wound.
Opposition politician Ozgur Ozel, who is from the Manisa region, which includes Soma, filed a proposal in late April to investigate Turkish mines after repeated deadly accidents.
Erdogan's government rejected the proposal. It claimed that the mine, owned by Soma Komur Isletmeleri A.S., had passed recent inspections.
A Turkish engineers' association criticized mine ventilation and safety equipment last week as being "insufficient and old."
A lack of safety inspections has caused 100 coal mines to be closed in the last three years, according to Turkey's Energy Ministry.
President Abdullah Gul, speaking as he visited Soma on Thursday, said he was sure the investigation already begun would "shed light" on what regulations are needed. "Whatever is necessary will be done," he said.
Gul Tuysuz and Ivan Watson reported from western Turkey, and Laura Smith-Spark wrote and reported from London. CNN's Diana Magnay, Talia Kayali and Ben Brumfield contributed to this report.