|MAIN Russian||About us On-line subscription|
It is to run from Mombasa to Nairobi and will extend eventually via Uganda to Rwanda and South Sudan.
In Kenya, the line is to replace a narrow-gauge track built more than 100 years ago during British colonial rule.
China is to finance 90% of the cost of the first stage, put at $3.8bn, with work carried out by a Chinese firm.
Construction work on the standard gauge line is expected to start in October this year, and the 610 km (380-mile) stretch from the coast to Nairobi is due to be finished in early 2018.
"The costs of moving our people and our goods... across our borders will fall sharply," Kenyan President Uhuru Kenyatta told a news conference after the signing.
Mr Kenyatta has previously said the new link should cut the cost of sending a tonne of freight one kilometre from 20 US cents to eight, Reuters news agency reported.
"This project demonstrates that there is equal co-operation and mutual benefit between China and the East African countries, and the railway is a very important part of transport infrastructure development," said Chinese Prime Minister Li Keqiang.
A subsidiary of China Communications Construction Co has been named as the main contractor.
According to the terms of the agreement, China's Eximbank is to provide 90% of the cost of the first phase of the line, with Kenya putting up the remaining 10%.
After that stage is complete, it is planned that work on the links to other countries in the region will start.
Construction of the original line began in Mombasa 1895 and the railway reached Nairobi in 1899.
It reached the shore of Lake Victoria in December 1901.
During the difficult and often dangerous work, at least 2,000 workers lost their lives - many of them Indian labourers imported to East Africa to build the railway.
Malaria, dysentery and other diseases took their toll as well as accidents and wild animals.