Kenya has opened a major new railway between the port city of Mombasa and the capital, Nairobi, 18 months early.
President Uhuru Kenyatta said during the launch that the $3.2bn (£2.5bn) Chinese-funded line signaled a new chapter in the country.
He warned that he would authorise the execution of vandals after four people were arrested damaging sections of a guardrail.
It is Kenya's biggest infrastructure project since independence.
The 470km (290 miles) line is part of China's Belt and Road initiative of massive global infrastructure projects.
The railway is supposed to eventually connect land-locked South Sudan, eastern Democratic Republic of Congo, Rwanda, Burundi and Ethiopia to the Indian Ocean.
Last week, Mr Kenyatta secured an additional $3.6bn from China to extend the railway line 250km (155 miles) west from the central town of Naivasha to Kisumu.
Mr Kenyatta, who is touting his development record as he seeks a second term in August's election, said the railway line heralded a new chapter in Kenya's history:
"A history that was first started 122 years ago when the British, who had colonised this nation, kicked off the train to nowhere... it was then dubbed the 'Lunatic Express'."
"Today... despite again a lot of criticism we now celebrate not the 'Lunatic Express' but the Madaraka [named after the day Kenya's attained internal self-rule) Express that would begin to reshape the story of Kenya for the next 100 years."
The railway may be Kenya's biggest infrastructure project since independence but it is also a part of a strategic plan for China to deepen its economic links in Africa.
A concessionary loan from China will pay for 80% of the cost.
The loan has a 10-year grace period, within which the railway line is expected to have started to generate income. The repayments will then be spread over 30-40 years.
The Mombasa-Nairobi line is the first phase of a 840km (525 mile) line linking the port city of Mombasa to the western border town of Malaba.