A strike by 20,000 truckers in South Africa ended Friday with an agreement to increase wages, said the strikers' union.

The settlement of the truckers' strike comes as the country's mining sector remains mired by a wave of strikes.

The truckers signed a three-year wage deal that gives them a 10 percent pay raise in the first year, said Vincent Masoga, spokesman for the South African Transport and Allied Workers' Union.

In the second year the truckers are to get an increase of 8.25 percent and then 9 percent in the third year, according to details of the settlement released by the Road Freight Employers Association (RFEA).

Magretia Brown-Engelbrecht, the executive officer of the RFEA, said that the striking truckers were expected to return to work immediately.

"After a total of 19 days of strike action and over four months of negotiations, parties finally managed to settle the dispute with a three-year deal, which will be implemented on 1 March 2013, subject to the Minister of Labour promulgating and extending same to non-parties," said Brown-Engelbrecht.

The strike, which had entered its third week, threatened the supply of gas and consumer goods across South Africa.

The truckers' strike was sometimes violent, with several trucks set on fire in South Africa and drivers attacked with petrol bombs and rocks. At least one driver died after being hit with a rock.

The labor unrest currently plaguing South Africa started in platinum mines in August before spreading to gold mines and then to the road freight sector. The violent strike at Lonmin platinum mine, in which 46 people died, was settled on Sept. 18. But most of the wildcat strikes by mineworkers remain unresolved with an estimated 80,000 miners, representing 16 percent of the nation's mineworkers, on strike. Some of the stoppages have been violent as police confront strikers armed with crude weapons.

Last week Anglo American Platinum, the world's top producer of platinum, dismissed 12,000 workers for staging an illegal strike and failing to attend disciplinary hearings. The fired miners have since threatened to make Amplats' operations in Rustenburg, northwest of Johannesburg, ungovernable. Two people died in violence there on Thursday.