Police opened fire after failing to disperse strikers armed with clubs and machetes at the Marikana mine.
The Lonmin-owned platinum mine has been at the centre of a violent pay dispute, exacerbated by tensions between two rival trade unions.
The incident is one of the bloodiest police operations since apartheid.
Violence had already killed 10 people, including two police officers, since the strike began a week ago.
South African President Jacob Zuma has cut short a trip to Mozambique in order to visit the mine, which lies about 100km (62 miles) north-west of Johannesburg.
The powerful National Union of Mineworkers put the figure at 36, according to AFP news agency.
Police were sent to break up some 3,000 miners who had gathered on a hillside overlooking Marikana to call for a pay rise of about $1,000 (£636) a month.
The circumstances that led police to open fire remain unclear, but reports from eyewitnesses suggest the shooting took place after a group of demonstrators rushed at a line of police officers.
Police, armed with automatic rifles and pistols, fired dozens of shots, witnesses said.
One witness, Molaole Montsho, of the South African news agency Sapa, said police had first used water cannon, tear gas and stun grenades in an attempt to break up the protest.
"And then in the commotion - we were about 800m [2,600ft] from the scene - we heard gunshots that lasted for about two minutes," he said.
Police ministry spokesman Zweli Mnisi justified the actions of police, saying they had a right to defend themselves.
"We had a situation where people who were armed to the teeth, attack and killed others - even police officers," the spokesman said in a statement on Thursday night.
There was no need whatsoever for these people to be killed like that”
"What should police do in such situations when clearly what they are faced with are armed and hardcore criminals who murder police?"
He said an investigation into the incident had been opened.
The Association of Mineworkers and Construction Union (AMCU) accused the police of carrying out a massacre.
"There was no need whatsoever for these people to be killed like that," General Secretary Jeffrey Mphahlele told Reuters news agency.
A spokesman for President Jacob Zuma said he would be travelling to the site later on Friday.
"The president is concerned about the violent nature of the protest, especially given that the constitution and labour laws allow enough avenues to deal with issues, and is sympathetic to calls for a commission of inquiry," his spokesman Mac Maharaj said in a statement.
Earlier, a statement from the president said he was "shocked and dismayed at this senseless violence".
"We call upon the labour movement and business to work with government to arrest the situation before it deteriorates any further," it said.
Thursday's incident came after several days of violent strikes in which 10 people were killed, including two police officers who were hacked to death.
The miners, who are currently earning between 4000-5000 rand ($484 - $605), say they want their salary increased to 12,500 ($1,512).
The stand-off has been exacerbated by rivalry between two trade unions, with the AMCU, a new group, seeking to challenge the dominance of the NUM.
The NUM is seen as being close to the ruling African National Congress (ANC) and the two groups were allies in the fight to end white minority rule, although relations between the ANC and the unions have worsened in recent years.
South Africa is the largest platinum producer in the world and the dispute has already affected production.
Lonmin, the world's third-largest platinum producer, has encountered similar labour disputes at the Marikana mine. In May 2011, the company sacked some 9,000 employees after a strike.
BBC World Service Africa editor
"This strike was sparked by a demand for better wages. And - armed with spears and machetes - strikers were in no mood for compromise.
But it goes much deeper than that. The traditional union in the area, the NUM, is a key ally of the African National Congress. Their backing is critical for President Jacob Zuma in his fight to retain his position in the ANC's party elections this December.
Miners accuse their leaders of abandoning their grassroots concerns, focussing instead on politics. So they turned to an alternative union to fight their corner. But - as so often happens in South Africa - this dispute turned violent. Two police had been killed earlier in the week.
The 3,000 police who surrounded the hilltop on which the miners gathered were determined not to join their dead comrades. It is in the culture of the force. As one former police commissioner said, they should "shoot to kill" without worrying about what happened after that.
South African commentators are comparing this tragedy to Sharpeville - when the police fired a crowd in 1960 - leading to the start of the armed struggle. This comparison seems a step too far. But the country is facing the bleakest moment since the end of apartheid."
- Related topics
- Last post