South African competition authorities have given the go-ahead to US store giant Wal-Mart's $2.4bn (£1.5bn) bid for local retailer Massmart.
It has imposed conditions on the bid, such as a ban on firing workers in the first two years.
It has also said that Wal-Mart must have a programme for developing local suppliers.
Wal-Mart's bid for 51% of Massmart is seen as a test case for major foreign investment in South Africa.
The world's biggest retailer had threatened to withdraw from the deal if targets were placed on buying from local suppliers.
"We're pleased that the competition authorities have recognised the benefits that our investment in Massmart can deliver," Wal-Mart International chief executive Doug McMillon said.
Massmart runs nine wholesale and retail chains, with 288 stores in 14 African countries.
Unions and three government departments in South Africa have opposed the takeover, fearing that Wal-Mart's global supply chain could squeeze domestic companies.
Unions threatened to boycott the retailer if the deal was allowed to go ahead.
In addition to the firing freeze, Wal-Mart must also give preference to re-employing 500 staff who were laid off in 2010.
Patrick Craven, spokesman for the trade union umbrella body Cosatu, said: "Our biggest concern remains completely unanswered and that is the knock-on effect on jobs in other retailers and the manufacturing industry.
"We would have liked to see some conditions on local procurement, although of course that ought to apply to all retailers, not just Wal-Mart."
Wal-Mart has also agreed to honour all collective bargaining agreements that are currently in place for the next three years.
It had already agreed not to make any lay-offs for two years and to spend 100m rand ($15m; £9m) in the next three years to help South African suppliers.
The competition tribunal will give the reasons for its decision in the next month.