A two-week strike by South African rail workers that left two million commuters stranded ended Tuesday just 10 days from the World Cup, during which the railway is expected to play a major role.

The country's Metrorail commuter trains and Shosholoza Meyl inter-city rail network will return to normal service Tuesday after the South African Transport and Allied Workers Union accepted an offer from the Passenger Rail Agency of South Africa, the union said.

"We are going to sign, everybody has accepted," Robert Mashego, the union's deputy president, told AFP.

Workers initially demanded a 16 percent wage increase, but settled for a 10 percent increase for the highest-paid workers, 12 percent for medium-wage earners and 12.5 percent for the lowest-paid, Mashego said.

All workers will also get a one-off payment of 1,000 rands (129 dollars, 105 euros), he said.

Nearly 12,000 workers at the rail operator went on strike on May 17, shutting down the agency's commuter trains and inter-city rail network nationwide.

Some two million daily commuters were initially left stranded by the strike, though limited service resumed after another union, the United Transport and Allied Trade Union, reached a deal with the rail operator on May 20.

Commuter trains and the inter-city rail network are expected to help bring World Cup fans to and from matches during the June 11 to July 11 tournament.

The rail agency has spent 225 million dollars (177 million euros) upgrading its train and bus services ahead of the World Cup.