JOHANNESBURG —Gold miners infected with lung diseases brought on by repeated exposure to the dust of South Africa’s mines have won a multimillion-dollar out-of-court settlement, their lawyer said Saturday.

Anglo American South Africa and AngloGold Ashanti have agreed to pay the equivalent of $32,595,800 to claimants affected by silicosis, settling the case before it went to court, said lawyer Zanele Mbuyisa, who represents 4,365 claimants.

Silicosis, caused by the inhalation of dust particles, makes victims vulnerable to diseases like tuberculosis. Most of the claimants worked in South Africa’s gold mines during apartheid, when miners rarely had the proper protective gear, according to the miners’ lawyers.