Yellen spoke at Ford's plant in Silverton, a suburb of Pretoria, during the third leg of her nearly two-week trip across the African continent, which also included stops in Senegal and Zambia.

The plant, which employs 4,000 people, is an example of how deeper ties between the United States and Africa could produce good jobs and boost economic growth for both sides, Yellen told workers and company officials.

"Africa will shape the future of the global economy," she said. "We know that a thriving Africa is in the interest of the United States. A thriving Africa means a larger market for our goods and services. It means more investment opportunities for our businesses."

Ford, a major U.S. investor in South Africa, is investing $1 billion to expand output at the plant there by 20%, adding 1,200 new jobs, and aims to develop a freight rail link with a seaport 700 miles (1,126.54 km) away.

Yellen said other U.S. companies, including Cisco, General Electric, and Visa also planned big investments, attracted by expanding markets fueled by a demographic boom that will see Africa account for a quarter of the world's population by 2050.

The U.S. Treasury chief said South Africa had been the biggest beneficiary of the African Growth and Opportunity Act, which grants eligible Sub-Saharan countries duty-free access to the U.S. market, but did not spell out what would happen when the legislation expires in 2025.

Yellen said South Africa also had a role to play in U.S. efforts to shift supply chains away from over-reliance on China and other non-market economies to more like-minded countries, an approach she has dubbed "friendshoring."

As in her comments to South Africa's finance minister earlier on Thursday, Yellen did not address South Africa's refusal to take sides over Russia's war in Ukraine or Washington's concern over military exercises it plans with China and Russia.

The massive economic disruptions caused by the COVID-19 pandemic and Russia's war against Ukraine underscored the need for resilient supply chains, she said.

"We are addressing the over-concentration of the production of critical goods in certain markets -- particularly those that may not share our economic values," Yellen said. "To do so, we are deepening economic integration with the many countries that we can count on. That includes our many trusted trading partners on this continent -- like South Africa."

(Reporting by Andrea Shalal; Editing by Tomasz Janowski)

By Andrea Shalal