Massmart, majority owned by U.S. retail giant Walmart, swung to its first half-year trading loss in two decades last August, as low growth, high unemployment and a rising cost of living hurt South Africans' spending power.

The retailer said in a statement it had started consultations with unions and other stakeholders around the closure of up to 34 stores, following a review that identified a number of outlets that were underperforming.

"A total of 34 Dion-Wired and Masscash stores and approximately 1 440 employees are potentially affected by this process," it said.

Dion-Wired is Massmart's electronics and appliances subsidiary, while Masscash is its wholesale division including cash and carry, food and cosmetics outlets.

Massmart shares, which sunk to a 13-year low last year after the retailer issued a profit warning, were up 2.4% by 0853 GMT.

A number of Massmart's rivals, such as Shoprite, are also struggling in the difficult market conditions, and both retailers have also had to battle currency weakness elsewhere in Africa, especially Zimbabwe and Nigeria.

(Reporting by Emma Rumney; editing by Olivia Kumwenda-Mtambo and Emelia Sithole-Matarise)