Russian shells hit a chemical plant near the north-eastern Ukrainian city of Sumy, causing an ammonia leak, officials say.
Residents of Novoselytsya, near Sumy, were told to stay indoors but the region's governor, Dmytro Zhyvytsky, later said the leak had been contained.
A 50-ton tank of the poison gas was damaged by the attack, local officials said, creating an ammonia cloud.
Ammonia is largely used to make fertiliser and is corrosive.
The Sumykhimprom chemical plant was attended by emergency crews, and the cloud affected an area of about 2.5km (1.5 miles), Dmytro Zhyvytsky said.
He said one injury was reported - a worker at the plant. Residents of Novoselytsya were advised to shelter because of the wind direction.
Ammonia is a common chemical that has several commercial uses, and the Sumykhimprom plant says its production is for making chemical fertiliser.
It is a waste product of the human body and usually dealt with by the liver, but is toxic in large amounts.
In the air, it is invisible but has a distinct unpleasant smell, and in high concentrations is both and irritant and corrosive.
It can cause pain and burns to the airway and injuries to the eyes. However, it is lighter than air, so does not remain on the ground as long as some other dangerous gases do.
Russia has previously alleged, without any evidence, that Ukraine was planning to use chemical weapons in the ongoing war, pointing to the creation of industrial chemicals such as ammonia.
Earlier this month, Russia's defence ministry alleged that Ukraine was plotting a "false flag" operation to blame Russia for using chemical weapons.
Yet Ukraine and its Western allies, including the US, have ridiculed such claims, and expressed their own concerns that Russia was setting the stage for its own false flag chemical weapons attack, which it would attempt to pin on Ukraine.
Ammonia is not well-known as a chemical weapon, since the human body has ways of processing it and it disperses, being lighter than air.