International Business Machines Corp. (IBM) is ramping up its digital-skills training program to accommodate as many as 25 million Africans in the next five years, looking toward building a future workforce on the continent.

The U.S. tech giant plans to make an initial investment of 945 million rand ($70 million) to roll out the training initiative in South Africa, a country where 31 percent of people between 15 and 24 are unemployed, according to Statistics South Africa. Other countries set to benefit in this program include Nigeria, Kenya, Morocco and Egypt, enabling the expansion of the project across the continent.

“Africa will have the largest workforce by 2040 and IBM wants to lay the foundation blocks to build a digital workforce,’’ Juan Pablo Napoli, head of IBM Skills Academy, said by phone from Dubai. “We will be providing a free cloud-based learning platform able to train people from basic computer skills to high-end app development.”

The move may help bring and keep digital jobs in Africa instead of losing them to India, said Hamilton Ratshefola, IBM’s country manager for South Africa. As many as 50,000 such jobs are currently farmed out from Africa, predominantly to India, Ratshefola said.

“If the program is implemented successfully over the five-year period all these jobs can be moved to Africa, where people will be equipped with the right set of skills,” he said.

The company has partnered with the United Nations in extending the initiative throughout Africa. IBM is also talking to a number of other potential partners, including mobile-phone companies, to further scale the program, Ratshefola said. In South Africa, IBM already is working with phone carrier Vodacom Group Ltd., he said.