The world's biggest platinum producer, Anglo American Platinum (Amplats), has agreed to reinstate the 12,000 South African miners sacked for taking part in an unofficial strike.
It had agreed to take back the miners if they returned to work by Tuesday, the National Union of Mineworkers said.
South Africa's mining sector has been hit by a series of wildcat strikes, which have cost millions of dollars.
Dozens of people have been killed in strike-related violence.
The miners were sacked three weeks ago.
"They agreed to reinstate all the dismissed workers on the provision that they return to work by Tuesday," NUM spokesman Lesiba Seshoka told the Reuters news agency.
He said he expected workers would return to their posts and "that will mean the end of the strike".
Amplats said in a statement: "Employees who do not return to work on Tuesday... will remain dismissed and/or be subjected to the illegal strike disciplinary action and will not be eligible for any of the benefits mentioned above."
The company said it was offering the miners a one-off hardship payment of $230 (£140) to facilitate their return.
Calm may now be returning, with many mining companies agreeing to higher wage demands, but in the longer term, more miners are likely to be laid off, says the BBC's Andrew Harding in Johannesburg.
And while the unrest has shaken the authorities here, there is no sign that it has prompted the sort of radical steps many are calling for, our correspondent adds.
Strikes at South Africa's platinum, gold and coal mines are estimated to have cost the country more than $1bn.
More than 40 people died in violent clashes between police and striking workers at a platinum mine in August.
South Africa is one of the world's biggest producers of precious metals.
Analysts say workers across the industry are disaffected with the NUM and other mainstream unions, regarding them as too close to the employers.
The workers had been demanding 16,000 rand ($1,840; £1,145) in monthly pay, more than three times their current average salary.