Villagers were evacuated on Russia's Sakhalin island in the early hours of Tuesday when a train loaded with military ammunition came off the rails, local media reported.

The Sovietskiy Sakhalin newspaper said police and emergency workers rushed to the site and cleared residents from nearby homes.

The incident occurred near the village of Roschino in the Smirnykhovsky region, the newspaper said, quoting local Interior Ministry officials.

Four wagons of the five-car train came off the rails. The ammunition aboard was not identified.

By mid-Tuesday, troops had begun to unload the wagons in preparation for lifting them back onto the tracks, Sovietskiy Sakhalin said.

The Interfax news agency quoted a military spokesman as saying the derailment may have occurred because one of the cars was improperly secured.

The southern half of Sakhalin was Japanese territory from 1905 until the end of World War II in 1945.

Karafuto, as it was known, was seized by Soviet troops and absorbed into the Soviet Union in 1945.

A lingering dispute over the status of several of the Russia-held Kuril Islands, which Japan refers to as the Northern Territories, has prevented Moscow and Tokyo signing a peace deal formally ending the war.