NAIROBI, April 18 (Reuters) - Sub-Saharan Africa is on course for economic growth of 3.1 percent this year, the World Bank said on Wednesday, marginally slower than it previously forecast but faster than last year thanks to rising commodity prices.

By 2020 growth in the region should pick up to 3.7 percent, it said.

Sub-Saharan African economies were hit hard by a crash in commodity prices which slowed growth, slashed government revenues and weakened several of the currencies on the continent. Growth was 1.5 percent in 2016, the lowest in more than two decades, before rising to an estimated 2.6 percent last year.

“While Nigeria, South Africa, and Angola are expected to see a gradual pick-up in growth, economic expansion will continue at a solid pace in the West African Economic and Monetary Union (WAEMU), and strengthen in most of East Africa,” the bank said in its Africa’s Pulse report for April.

“These forecasts are predicated on the expectations that oil and metals prices will remain stable, expansion in global trade will stay robust, and external financial market conditions will continue to be supportive.”

In January, the World Bank’s Global Economic Prospects report forecast growth in sub-Saharan Africa would rise to 3.2 percent in 2018.

Nigeria, South Africa and Angola make up about 60 percent of sub-Saharan Africa’s annual GDP.

The bank said Nigeria was experiencing a recovery in oil output but hurdles in non-oil industries and services would be a drag on activity.

“In Angola, the revisions reflect the expectation that a more efficient foreign exchange allocation system, increased availability of foreign exchange due to higher oil prices, rising natural gas production, and improved business sentiment would help support the rebound in economic activity,” the bank said.

“In South Africa, slowing inflation and improving business confidence are expected to help sustain the ongoing recovery in domestic demand, especially in investment.”

The bank said that while growth prospects were encouraging, there were still hurdles ahead.

“Growth in the non-oil industrial sectors has yet to pick up, underscoring the low structural transformation in the region; employment opportunities are lagging; public debt relative to GDP is rising; and poverty is widespread,” the report said.

The main risk to growth in the region was the possibility of a collapse in commodity prices.

“A possible trigger could be a slowdown in Chinese growth, given the risks posed by interest rate hikes or trade tensions with the United States,” the World Bank said.

“A collapse in oil and metals prices would severely undermine efforts at fiscal consolidation, derailing progress in reining in the region’s debt burden.” (Reporting by George Obulutsa; Editing by Susan Fenton)