(Adds background, details)
JOHANNESBURG May 20 (Reuters) - The world's top platinum producers and the AMCU union agreed on Tuesday to court-mediated wage talks aimed at ending the longest and costliest mining strike in South African history.
Anglo American Platinum, Impala Platinum and Lonmin said in a joint statement that the mediation process would begin on Wednesday and last for up to three days.
The strike by the Association of Mineworkers and Construction Union (AMCU) has hit 40 percent of global platinum production and has dragged on for 17 weeks, squeezing already sluggish growth in Africa's most advanced economy.
After talks collapsed in late April, producers took their latest offer directly to the more than 70,000 striking miners via text messages and other means.
AMCU opposed the direct offers to its members and the labour court was scheduled to hear its complaints about the matter on Tuesday.
However, the parties agreed to return to negotiations sponsored by the court, which will act as a mediator and issue no ruling on the strike.
"Other issues will be put on hold, giving the judge the opportunity to mediate to see if we cannot find a settlement," AMCU treasurer Jimmy Gama said.
The strike has been turning violent, with four miners murdered last week as employees have tried to return to work on the restive platinum belt northwest of Johannesburg. (Reporting by Zandi Shabalala; Additional reporting and writing by Ed Stoddard; editing by David Dolan)