BEIJING - The Chinese government on Tuesday ordered a two-month, nationwide safety campaign for its railway system after a collision between two bullet trains killed at least 39.

The Railways Ministry said in a statement on its website that all local railway bureaus were to draw lessons from Saturday's accident in the eastern city of Wenzhou and immediately launch safety inspections.

One train rammed into the back of another that had stalled after being hit by lightning, causing six carriages to derail and four to fall about 20 to 30 metres from a viaduct. More than 190 people were injured.

The ministry says local railway bureaus in various cities around the country such as northwestern Urumqi, southwestern Kunming, Harbin in the northeast and elsewhere have already begun safety checks.

The accident was the latest blow to China's bullet train ambitions. Designed to show off the country's rising wealth and technological prowess, the high-speed rail project has national prestige on par with China's space program.

Beijing plans to expand the high-speed rail network -- already the world's biggest -- to link far-flung regions and is also trying to sell its trains to Latin America and the Middle East. But critics say tickets are costly and the services do not really meet the needs of average travelers in many areas.

Last month, China launched to great fanfare the Beijing to Shanghai high-speed line, whose trains can travel at a top speed of 300 kilometres per hour. The speed was cut from the originally planned 350 kph after questions were raised about safety.

In less than four weeks of operation, power outages and other malfunctions have plagued the showcase 1,318-kilometre line. The Railways Ministry previously apologized for the problems and said that summer thunderstorms and winds were the cause in some cases.

Railways Minister Sheng Guangzu said the inspection campaign would be held over two months, and apologized for the crash that was China's deadliest rail accident since 2008, the People's Daily newspaper said.

Sheng placed an emphasis the safety of bullet trains, the report said, saying that research should be done to solve recurrent problems with the trains' equipment.

The Railways Ministry and government officials have not explained why the second train was apparently not warned a stalled train in its path.

The government also moved to compensate relatives of victims. The family of one victim agreed to accept payment of 500,000 yuan (US$77,500), the official Xinhua News Agency said Tuesday, citing the government of Wenzhou city.