More than 400 people were stuck on a train overnight after heavy snowfall blanketed much of Japan's western coast.
The train started moving at around 10:30 (01:30 GMT) on Friday morning, some 15-and-a-half hours after it was forced to stop on Thursday evening.
The JR East railway company said the four-car train departed Niigata city at 16:25 (7:25 GMT) on Thursday.
As heavy snow accumulated, the train's wheels couldn't turn anymore, and it stopped at about 19:00 (10:00 GMT) at a railway crossing.
Officials decided it was too risky to evacuate all the passengers because of the deep snow and darkness. The train had electricity and heat. Five passengers who said they did not feel well were taken off.