China has agreed to lend Nigeria $1bn (£532m) so that the African nation can modernise its railways and help speed up the development of its economy.
Infrastructure needs renovating across much of Africa
Under the deal, Nigeria will have to provide matching funds to buy new rolling stock and equipment, as well as lay new track.
The deal is the latest example of China looking to tighten relations with oil-producer countries, analysts said.
China wants to secure steady energy supplies as its economy booms.
Chinese firms also are keen to tap into what they hope will be the quick development of the Nigerian economy.
After many years of waste and corruption, Nigeria has paid off most of its foreign debts and set itself ambitious goals for economic growth.
"Provision of infrastructure is critical for economic development," said Nigeria's Finance Minister Ngozi Okonjo-Iweala.
The announcement of the loan comes after China's CITIC group and China Railway Construction last week won a tender to build 528 km of the 1,216-km Algeria East-West Highway, beating US, German and Japanese firms.