The smoke-filled streets of Dari Ekh, an unplanned ger district in Ulan Bator, Mongolia, as homes burned coal on a February evening.

ULAN BATOR, Mongolia — Mongolians have long relied on folklore to explain how miserably cold their winters are.

Russia Ulan Bator Mongolia China

During the first of nine phases of winter — each composed of nine days, starting on Dec. 22 — it is said that vodka made from milk freezes. During the third set of nine days, when temperatures can hit minus 40 degrees in both Fahrenheit and Celsius, the tail of a 3-year-old ox is said to fall off. Around the sixth set of nine days, which falls in the middle of February, roads are expected to re-emerge from underneath the ice and snow.

But for the nearly 1.5 million residents of the capital, Ulan Bator, the misery of winter is now defined almost singularly by the smoke rising out of the city’s chimneys. Since 2016, in addition to being the world’s coldest capital city, it has also had the distinction of being the one with the highest recorded levels of air pollution, surpassing notoriously polluted megacities like Beijing and New Delhi.

According to local government figures, around 80 percent of Ulan Bator’s air pollution is produced by just over half the population, living in the so-called ger districts in the north of the city, named for the traditional nomadic dwelling central to Mongolians’ herding lifestyle.

Preparing for an ice archery competition on the frozen Tuul River, which runs through Ulan Bator.

Residents walking through a northern Ulan Bator district on a polluted February morning.

Orlom Namjildorj used a coal stove to make Mongolian milk tea for her husband, Byambatseren Usukhbayar, in the family’s ger, or yurt.

The ger, or yurt, is a circular tent comprising a single room, with a family’s bedding and furniture arrayed around the device that makes its simple architecture survivable in such a harsh climate: a stove. The ger can be packed onto a truck and set up within a few hours.

In recent years, the predominantly lower- to middle-income migrant workers who reside in these unplanned districts have been burning over a million tons of raw coal per year.

With little work available in Mongolia’s smaller cities, hundreds of thousands have left behind the nomadic herding lifestyle in the hope of finding opportunities in the mineral boomtown that Ulan Bator has become. And they have settled in the ger districts, which have sprung up because of a lack of clarity about land ownership.

During the Communist era, land belonged to the state, but starting in 1991, land was defined as belonging to the citizens of Mongolia, leading to confusion as newcomers to the city claimed land and demanded ownership of it.

In recent years, the predominantly lower- to middle-income migrant workers who reside in these unplanned districts have been burning over a million tons of raw coal per year. The heaviest use is during the winter when staying warm is a matter of survival as temperatures remain well below freezing for weeks at a time. Those who can’t afford coal often burn garbage, adding plastics and other pollutants into the soupy mix.

Coal smoke rose from a school’s coal boiler on the outskirts of Ulan Bator as two girls walked home after class last month.

As families huddle indoors, burning coal around the clock, sections of the city see their levels of fine particulate matter, a pollutant, soar into the thousands. On Jan. 30, one station in Ulan Bator recorded a reading of 3,320 micrograms per cubic meter — 133 times what the World Health Organization considers safe, and more than six times what it considers hazardous.

In January, Prime Minister Ukhnaagiin Khurelsukh announced that the transportation and use of raw coal in Ulan Bator would be banned starting in April 2019 as part of an effort to improve the city’s air quality.

Meantime, the government has been trying with its limited resources to put a dent in the problem. Subsidies have been offered to families for stoves that produce less pollution, and since January 2017, electricity in many of the city’s highest-polluting districts was made free at night, when pollution levels are at their most severe.

Sellers of raw coal negotiating prices with passing customers at the Shar Khad market.

A miner ducked into a warm ger at the Nalaikh mines on the outskirts of Ulan Bator.

A horse resting after training for traditional races on the outskirts of Ulan Bator.

But the cost of electric heaters that can adequately heat a thinly insulated home in the cold of winter is far out of reach for many in the ger districts. Nonsubsidized electricity is more expensive than coal, and far less plentiful.

The planned ban on coal has raised eyebrows among miners and sellers who extract and transport truckloads of the freshly extracted fuel from the city’s Nalaikh area, which provides 75 percent of the coal burned in the ger districts.

Many are skeptical that Mongolia’s government will be able to enforce the ban.

“It’s a fairy tale,” said Khangai Unurkhaan, 25, who sells raw coal by the truckload at the Shar Khad market near the city center.

An entire flatbed of a small truck — weighing 1.3 tons — is enough to last a single family roughly one month during the coldest four months of winter.

“There are thousands of families who mine, sell and burn coal in order to live,” added Mr. Unurkhaan, who had barely given his name before he was off to deliver to a client’s home his 1.3-ton load of coal, which at $65 to $75, depending on the quality of coal, lasts a family about one month, according to official estimates.

Abandoned open pits of the former Soviet-operated coal mine at Nalaikh. The surrounding hills are green with grass during the warmer months.

But residents agree that something has to be done, particularly to protect the youngest and the elderly, who are most at risk because of the pollution.

Already, the pediatric wards of hospitals have banks of nebulizers to treat the large variety of respiratory infections and viruses that become both chronic and dangerous during the winter months.

Because of the pollution, “a simple flu becomes a pneumonia or bronchitis very easily,” said Dr. Soyol-Erdene Jadambaa, an immunologist at the Batchingun allergy and immunology children’s hospital, a private clinic. “It requires long-term treatment.”

Pneumonia killed up to 435 children under the age of 5 in Ulan Bator in 2015, according to Unicef.

Temuulen Ganzorig, 5, prepared to inhale medication through a nebulizer as part of his treatment for the flu at the Batchingun clinic.

Ulan Bator’s rising skyline, framed by a Soviet-era monument to the modern Mongolian state’s founding.

Sorting coal at the Nalaikh mines.

“We need a completely new city,” said Batmend Shirgal, who was raised in Ulan Bator and is now an engineer at one of the city’s power plants, as his 2-year-old daughter helped her younger brother hold a nebulizer to his small face at the Seven Dwarfs Pediatric Clinic near Ulan Bator’s airport.

The family had lived year-round in a planned part of the city with municipal heating until last year, when both children suffered severe cases of pneumonia and were hospitalized. This winter, the family decamped to Nalaikh, 24 miles outside the city, where the air is cleaner despite the area’s being the primary source of Ulan Bator’s coal.

“If you take coal out of the ger, people will burn anything,” Mr. Shirgal said. “The tires on their cars, their neighbors’ fences. It’s hard to survive in minus 30 degrees.”