Hundreds of Ukrainians were evacuated from their homes Tuesday after a train derailed and released a cloud of toxic gas into the air that affected 14 villages. Twenty people were poisoned and hospitalized, said Ihor Halyavinsky, spokesman for the defense ministry, adding there was no threat to their lives.

The freight train, carrying yellow phosphorus, derailed in western Ukraine late Monday. Rescuers extinguished a fire that broke out in the highly toxic substance, which can catch fire spontaneously on contact with air at temperatures higher than 104 degrees Fahrenheit. It can cause liver damage if consumed.

Ukraine's Deputy Prime Minister Oleksandr Kuzmuk, who was at the site, compared the accident to the explosion at the Chernobyl nuclear reactor in 1986.

"A disaster has happened. After the Chernobyl catastrophe we are dealing with a case that can pose a real threat for our people," said Kuzmuk. "It is an extraordinary event, the consequences of which cannot be predicted."

Of the 11,000 people living in the contaminated area, 815 were evacuated, said Ihor Krol, spokesman for the emergency situations ministry.

The train, which was traveling from Kazakhstan to Poland, derailed near Lviv on the Polish border. Of the train's 58 cars, 15 overturned and six caught fire, Krol said.

The poison cloud produced by the fire contaminated 35 square miles containing 14 villages, Krol said. Local residents were advised to stay inside, not to use water from wells, eat vegetables from their gardens or drink the milk produced by their cows.

Ukrainian television Channel 5 reported that in several villages located in the contaminated area residents were not informed of the safety rules after the accident.

Transport Minister Mykola Rudkosvsky said a commission was working at the scene to determine the cause of the accident. He said it was too early to say what caused the derailment.

Phosphorus compounds are chiefly used in fertilizers, although they are important components of pesticides, toothpaste, detergents as well as explosives and fireworks.