"The United States is committed to working with you to deepen our ties: not for show, not for the short term, but for the long haul," she said after visiting a Ford plant in Pretoria.
"A thriving Africa is in the interest of the United States," she said.
Her visit to South Africa, the continent's most industrialized economy, came hot on the heels of a trip by Russia's Foreign Minister Sergei Lavrov, who was in Pretoria earlier this week.
"Russia's brutal war against Ukraine has raised energy prices and exacerbated food insecurity. These shocks have taught us about the importance of secure and resilient supply chains," Yellen said.
During a meeting earlier with South African Finance Minister Enoch Godongwana, she praised an energy transition partnership in which the Britain, France, Germany and the EU have pledged $8.5 billion to help the country decarbonize its coal-dependent economy.
"This partnership represents South Africa's bold first step toward expanding electricity access and reliability and creating a low-carbon and climate-resilient economy," Yellen said.
Godongwana thanked the US for the commitment, noting in a statement that it came at a critical time as the country grapples with grinding energy shortages.
But the minister added that developed nations could do more, in particular by ensuring that financial support includes a much larger grant-funding component.
Africa's "special needs and circumstances" needed to be recognized globally, Godongwana said, adding that many of its countries were resource-dependent and suffered from high levels of poverty, unemployment and underdevelopment.
US Treasury Secretary Janet Yellen said Thursday that Washington would "deepen" its ties with African nations, as she wound up a continental tour in South Africa.
JOHANNESBURG —