South African President Jacob Zuma has given details of the commission that will investigate the circumstances around the deaths of 44 people at the Marikana platinum mine.
The actions of mining company Lonmin, the government, police, unions, and individuals will all be examined.
Thousands of people, some crying uncontrollably, earlier attended a memorial service for the dead.
Thirty-four were shot dead by police during a strike over pay last week.
Previously 10 people, two of them police officers, had died in violent clashes.
Reports of worker action at two other platinum mines have added to industry fears that the unrest is spreading.
The price of platinum has jumped amid concerns about disruptions to supply.
Outrage and grief
The commission "has been directed to investigate matters of public, national and international concern rising out of the events in Marikana which led to the deaths of approximately 44 people, the injury of more than 70 persons and the arrest of more than 250 people," Mr Zuma said in a televised statement.
He said the commission would have the power to enter premises, compel witnesses to appear and demand documents. Not only security issues but issues surrounding labour policies and working conditions would also come under its remit, he added.
Retired appeals court judge Ian Farlam will head the three-person commission, along with two other senior advocates who are also former judges, reported Agence France-Presse.
The commission should complete its work within four months, Mr Zuma said, and submit a final report a month afterwards.
Rob Davies, South Africa's trade and industry minister, said the actions of the police would be investigated with "considerable depth".
"The inquiry will have to establish the chain of responsibility, who did what wrong and hold anybody who did wrong to account. I think that is a correct process in a democratic society - that if actions are taken against people they have to be on the basis of evidence," Mr Davies told the BBC's Hardtalk programme.
The deadly clashes have thrown South Africa into a frenzy of outrage and grief, say correspondents.
Many relatives have asked how the police - faced with strikers wielding machetes and clubs - could have killed so many in response.
There has been a strong police presence around the mine since the dispute erupted but they were noticeably absent for Thursday's memorial service, correspondents said, probably due to fears that violence could erupt.
But speaker after speaker also turned their ire on the government, they said, amid a perception that some politicians have been trying to make political capital out of the affair - and a suspicion among some that government has been complicit in the killings.
Church leaders from a range of denominations, politicians and thousands of mourners attended the emotional, hymn-filled service. Hundreds crammed inside the memorial marquee and hundreds more outside.
At one point the service was disrupted by green-clad members of the militant Association of Mineworkers and Construction Union (AMCU), who walked to the front of the marquee brandishing sticks and machetes, but the service soon resumed.
With his government under fire for allegedly putting corporate interests above worker rights, Mr Zuma has expressed sympathy with some of the grievances expressed by the Marikana miners.
He has argued the mining sector can afford to increase wages and threatened companies that fail to raise workers' housing standards with the cancellation of their mining licences.
Visiting the mine on Wednesday, Mr Zuma told workers he "felt their pain" and promised a speedy and thorough investigation of the shootings.
But fears expressed by analysts and industry executives that unrest could spread to other parts of the mining sector were given weight with reports of worker action at two other platinum mines.
The world's top platinum producer, Anglo American Platinum, said it had received a broad list of demands from its South African workers.
Meanwhile, some 500 workers at a shaft in the nearby Royal Bafokeng Platinum Mine downed tools on Wednesday, demanding a pay increase and reportedly blocking fellow miners from going to work.
Religious leaders have brokered talks between the Lonmin management and workers in an attempt to break the deadlock in the dispute over pay.
No unions were involved because "they already failed us", Zolisa Bodlain, one of five workers who met managers, told the BBC - but the workers vow that they will not back down even without the unions' help.
Part of the background to this complex dispute is the rivalry between two unions - the long-established National Union of Mineworkers (NUM) and the newly-formed AMCU, which is more militant.
Both will come under scrutiny under the terms of the commission of inquiry set out by the president.