No power, no lights, no water, no heat. In Ukraine over the past year, waves of Russian missiles have assailed the nation’s infrastructure, leading to daily struggles for civilians and to months of frantic repairs to keep the electricity flowing.

An American satellite has revealed this darkening of the entire nation, creating a vivid companion to portraits of its people’s misery and perseverance. The satellite’s images of city lights flickering out across Ukraine drive home the magnitude of the humanitarian disaster in a way that’s otherwise difficult to imagine.

The satellite, launched in 2011, has powerful night vision that’s equal to or better than anything the human eye can see in the dark. The dimming of particular cities is thus clearly visible from 500 miles up and presents a grim contrast to Ukraine’s brightly lit neighbors, such as Poland and Russia.

“There’re huge blackouts,” said Eleanor Stokes, a lead scientist in NASA’s Black Marble project, which processes the nighttime imagery. “It gets depressing.”

Cities like Kyiv, captured by the satellite as a spidery web of light before the war, fade and fracture in the ensuing months. More generally, the impact of Russia’s invasion is plainly evident when comparing Ukraine’s brightness before the incursion of Feb. 24 last year with that during the ensuing months, when Europe’s second largest nation plunged into intermittent darkness.

The images also show the effects of Russia’s infrastructure strikes, which picked up last fall when Moscow embarked on a new offensive meant to weaponize winter. Struggling on the battlefield, President Vladimir V. Putin of Russia sought to make civilian life as hard as possible, depriving millions of people of heat, light and water in hopes that wide suffering in the bitter cold would break Ukraine’s spirit. December was the coldest and darkest time for Ukraine since World War II.

Not all blackouts are the result of Russian strikes. To keep the nation’s energy grid from collapse, Ukrainian officials have at times conducted rolling outages and controlled blackouts so they can even out the supply of electricity and carefully distribute the available power. Improved air defenses and engineers working under constant threat of attack have also contributed to the grid’s survival.

The streetlights in Kharkiv, Ukraine, were switched on for the first time recently, while the portable generators needed by businesses in Kyiv have gone silent. And for the first time since October, Ukraine can, on some days, generate more power than it consumes.

“Despite the cold, darkness and missile strikes, Ukraine persevered and defeated the winter terror,” Dmytro Kuleba, Ukraine’s foreign minister, said earlier this month.

The nighttime images come from a satellite named after Verner E. Suomi, a scientist at the University of Wisconsin who pioneered early satellite cameras. Suomi is run jointly by the National Aeronautics and Space Administration and the National Oceanic and Atmospheric Administration. Previously, the satellite’s night sensor has captured images of wildfires, gas flares, lava flows, light pollution and power outages from hurricanes.

The night sensor works by observing the Earth not only in visible wavelengths but also in infrared, which reveals radiant heat energy. Processing removes clouds and corrects numerous distortions. The result is not a camera-like image but one customized for precise measurement.

What follows is a visual examination of Ukraine’s diminished city lights. It features short visualizations made from monthly composite images of the satellite’s daily readings.

What’s in this visualization: This is eastern Ukraine, a front line of fighting since 2014 when Moscow-backed separatists began to fight the government in Kyiv. It shows how the lights started to blink out as Russia attacked Ukraine from the south, east and north, affecting major cities such as Mariupol, Dnipro and Zaporizhzhia. The sequence also includes the separatist, Russian-aligned portions of the regions of Donetsk and Luhansk, denoted by the dotted line within a region known as the Donbas.

What was happening on the ground: This part of Ukraine becomes increasingly dark, as the war continues and virtually all the visible communities go offline.

Near the city of Zaporizhzhia is Europe’s largest nuclear power plant. Before the war, it provided 20 percent of Ukraine’s energy needs. When Russia seized the plant in March, engineers had to cut back its output because of the danger caused by the fighting. When the reactors were taken offline, millions across the country lost power briefly.

For much of the summer, the front line did not change dramatically, as Russia tried to grind out new gains through unrelenting artillery bombardments. In the western Donbas region, that tactic left a dark trail of destruction — almost all the towns and cities that Russia has captured since its full-scale invasion have been reduced to lightless ruins.

Throughout the period, cities in the visualization’s southeast are mostly spared from the darkness because they are under Russian occupation. Life in areas controlled by the separatist groups — the Donetsk People’s Republic and the Luhansk People’s Republic — limps ahead. Although the lights have stayed on in those places, President Putin in October declared martial law in some territories it occupied, giving the Kremlin sweeping powers to seize property, conduct searches, restrict movements, resettle residents and detain civilians.

What’s in this visualization: This is Kyiv, the capital and Ukraine’s most populous city, as well as the surrounding areas and communities. They are vibrantly lit in late 2021 but dim as they become early targets of Russia’s invasion. In the fall of 2022, the city’s lights are further reduced as a result of controlled blackouts as well as infrastructure strikes by Russia.

(Bright splotches visible to the east of Kyiv in late 2022 are industrial sites, most likely large commercial greenhouses picked up by the satellite.)

What was happening on the ground: The Russian invasion began as the Kremlin launched missiles at targets across Ukraine and then a ground assault meant to topple the government in Kyiv. Despite being outmanned and outgunned, the Ukrainians beat back the Russians and drove them back across the northern border.

Amid this fighting, Kyiv’s lightprint shrank as surrounding towns and villages lost power.

The strikes aimed at taking out Kyiv’s power intensified in October and, by mid-November, the city was plunged into near total darkness. The waves of missile strikes came at least once a week for some two months, wreaking havoc on basic services.

The loss of power affected more than the lights. When the water stopped running for several days, people were forced to line up at stone wells around the city. Elevators in high-rise buildings failed, often trapping passengers inside. Car accidents soared. Delicate surgeries were conducted by the light of headlamps. People bundled up from the cold, as centralized heating stopped working.

But with improved air defenses, attacks became less frequent as Russia ran low on missiles. Engineers made repairs, and the situation stabilized and then improved. By this spring, there were no more rolling blackouts. On some sunny days in March, Ukraine was even able to produce more energy than it consumed. A bombardment on March 9 caused disruption, but the city fully restored power three days after the attack.

What’s in this visualization: This includes Odesa, a main Ukrainian port on the Black Sea; Mykolaiv and Kherson, cities close to the shifting front lines that have both felt the brutality of the war; Crimea, a peninsula Russia annexed in 2014; and Melitopol, a landlocked city that Russia seized during the 2022 invasion.

What was happening on the ground: The taking of Odesa — established in 1794 by Catherine the Great, the Russian empress, as a conduit to the Mediterranean — is an obsession of Mr. Putin. The storied port has been hit by Russian strikes and threatened by Russian warships periodically throughout the war but remains far from the front lines. In December, Odesa suffered drone strikes that plunged more than 1.5 million people into darkness. In the visualization, the city’s lights go on and off amid the strikes and the struggles to make repairs.

Crimea stays lit throughout the war — a stark reminder of its occupation by Russia. The peninsula, home to many Russian troops and military bases, is an important staging ground for attacks on the rest of Ukraine. The satellite images clearly show the steady lights of two cities on the peninsula: Sevastopol, home of Russia’s Black Sea fleet, and Simferopol, the capital of Crimea. Part of Russia’s strategy in southern Ukraine has been to create a “land bridge” that would tie Crimea to the occupied parts of the Donbas.

Melitopol — a city that stays lit in the far right above Crimea, even as nearby cities and towns go dark — was occupied by Russian troops early in the war. In recent months, Ukrainian forces have hit targets inside Melitopol with the help of Ukrainian partisans living under occupation. Those strikes signal that Melitopol may become one of Kyiv’s main targets. Recapturing the city could help Ukrainian forces take back the region of Zaporizhzhia and Kherson as well as launch an offensive that could potentially push Russian forces back into the Crimean peninsula.

What’s in this visualization: This is Mariupol, a city in southeastern Ukraine situated on the northern coast of the Sea of Azov. A port boasting a thriving steel industry as well as miles of beaches, Mariupol turns from brightly lit to hauntingly dark from November 2021 through December 2022. Scattered illumination returns late in the year.

What was happening on the ground: Russian soldiers surrounded Mariupol in the first weeks of the war and then laid siege to the city. They bombed a maternity hospital as well as a theater housing scores of women and children seeking refuge. Russian forces employed siege tactics, cutting the city off from power as they tried to force Ukrainian fighters defending the city to surrender.

After 80 days of mounting a last stand in the twisted ruins of the Azovstal Iron and Steel Works, the Ukrainian defenders were ordered to stand down and, in May 2022, the Russians took control of the city. It was in ruins. Residents who made it out describe little by way of efforts to restore essential services, contrary to Russian claims. However, in the fall of 2022, some lights came back on.