Rescuers work at the site of train derailment near the Malaya Vishera village caused by an apparent explosion.

"The train accident was caused by a homemade explosive device," Sergei Bednichenko, chief prosecutor for Russia's North West district, told Channel One television.

"A criminal case has been opened under article 205, clause 3, that is terrorism."

The head of Russia's Federal Security Service (FSB), Nikolai Patrushev, linked the bombing to an insurgency in the south of the country around Chechnya, where Moscow has been fighting a long rebellion against its rule.

Officials briefed Russian President Vladimir Putin on the investigation into the train bombing and he asked to be informed of any developments, a Kremlin spokeswoman said.

The derailed train was an overnight service travelling on one of the country's busiest rail routes. It is heavily used by businesspeople and foreign tourists.

Sixty passengers and train crew were injured in the derailment, and 38 of them were admitted to hospital, a spokeswoman for rail operator Russian Railways said. About 250 people were on board in all.

The incident happened late on Monday near the village of Malaya Vishera in the Novgorod region, about 500 km (300 miles) north of Moscow and 170 km from St Petersburg.

The bomb was planted on a bridge over a road and left a crater about 2 meters (6 ft) across, eyewitnesses said. The train came off the tracks just after crossing the bridge, a Reuters photographer at the scene said.

Patrushev said the train bomb was part of a pattern of violence that also included a spate of attacks on security forces and officials in the North Caucasus region around Chechnya.

"We have been able to significantly reduce the ... number of terrorist attacks," Interfax news agency quoted Patrushev as saying. "Nevertheless, the threat of extremism and terrorism has not been removed once and for all."

The Reuters photographer at the crash scene said nearly all the carriages and the locomotive had left the tracks, and at least three carriages were tipped onto their side.

"We heard two explosions, then the train put on the brakes suddenly," one conductor on board the train, who did not want to be identified, told Reuters.

"The train shook. A panic started," he said. "We smashed out the glass and helped the passengers out ... The worst damage was in the restaurant car. That is where most of the casualties were."

Rebel fighters linked to Chechnya have used bombs to target passenger trains in the past.