(CNN) -- A collision between a bus and a train in the Ukraine on Tuesday left 42 people dead and nine others injured, officials said.

The crash took place when a commuter bus and a railway locomotive collided in Ukraine's Dnipropetrovsk region, according to Ukraine's Emergency Situations Ministry.

The accident occurred at an unguarded train crossing near the village of Maksimovka on the stretch between the cities of Nikopol and Marhanets, the ministry said. According to preliminary information, the bus was carrying 51 people as it was driving over the crossing.

Are you there? Share your photos and videos

Railway officials told Ukrainian news agencies that the crossing was closed for cars, and the warning lights were on.

A preliminary investigation showed that the bus driver ignored the warning light signals and violated safety rules by crossing the passage when the train was approaching it, the officials told local agencies. The driver of the train survived, but it was not immediately known if he was injured.

President Viktor Yanukovych expressed his condolences for the victims' families and declared Wednesday a national day of mourning, according to the president's press office.

The government will pay 100,000 Ukrainian hyrvnas (about U.S. $12,600) to the victims' families, according to the emergency ministry.