LIMA/JOHANNESBURG, March 22 (Reuters) - The Democratic Republic of the Congo overtook Peru as the world's second largest copper producer in 2023, though it still lags the South American country in exports, official data from both nations show.

Congo produced about 2.84 million tons of copper last year, the country's central bank reported. Peru's output was 2.76 million tons, the Andean country's mining and energy ministry said.

Congo has been reeling in Peru's No. 2 copper spot over recent years, with flagging mining investment in Peru linked to red tape and recent political turmoil and protests. Chile remains the distant top producer of the red metal.

Peru, however, is hanging onto its lead over Congo on copper exports. Peru exported some 2.95 million tons of the metal last year, more than its annual production due to sales of stocks held over from previous years.

Rómulo Mucho, Peru's minister of energy and mines, said in early March he expected copper production to increase to 3 million tons in 2024. The ministry did not immediately respond to a request for comment.

Peru's Andes are home to major mining firms including Freeport-McMoRan, MMG Ltd, BHP, Glencore, Teck Resources, Japan's Mitsubishi , and Southern Copper of Grupo México.

(Reporting by Marco Aquino in Lima and Felix Njini; Editing by Adam Jourdan and Richard Chang)