MEDINACELI, Spain - Millions of people gathered across northern and central Spain on Wednesday to watch the country's first total solar eclipse in more than a century, cheering as the Moon covered the Sun and evening daylight briefly gave way to darkness.

In Medinaceli, a hilltop town northeast of Madrid, spectators secured viewing places hours before totality. Similar crowds filled towns and cities across the path, including areas near A Coruna, Bilbao and Santiago de Compostela. Demand for hotel rooms rose sharply as residents and visitors moved toward locations with clear western horizons.

The path of totality also crossed parts of Greenland and Iceland, the Atlantic Ocean and a small area of Portugal. NASA said many other locations saw a partial eclipse, including parts of the northern United States and Canada, most of Europe and northwestern Africa.

Totality lasted less than two and a half minutes at its longest point off Iceland's west coast. In Spain and Portugal, where the eclipse arrived shortly before sunset, the fully dark phase was closer to a minute in many places. The low Sun turned the event into an unusual combination of totality and sunset.

Spanish authorities expected at least 500,000 additional visitors, according to The Associated Press. Officials established about 350 viewing sites and deployed more than 33,500 law-enforcement officers to observation areas and access points. The preparations came during temperatures above 35 degrees Celsius in many locations and after destructive summer wildfires strained parts of the country.

Clouds and rain obscured the Sun in Reykjavik, but hundreds still gathered outside Hallgrimskirkja church and cheered when the city abruptly darkened. Iceland expected as many as 20,000 additional overseas visitors, and average hotel prices in Reykjavik exceeded $1,000 for the night, AP reported.

A total solar eclipse occurs when the Moon passes directly between Earth and the Sun and its inner shadow reaches the ground. Only observers within the narrow path of totality see the Sun's bright face completely covered. People outside that band see a partial eclipse instead.

NASA stressed that viewers may look at the Sun without eye protection only during the brief period of complete totality. Before and after that moment, certified solar glasses or other safe filters are essential. Ordinary sunglasses are not sufficient, and cameras, binoculars and telescopes require filters mounted at the front of the optics.

The spectacle was also a large test of public planning. A rare event can create tourism revenue and shared excitement, but it can overwhelm rural roads, emergency services, hotels and areas already exposed to heat and fire. Spain's official viewing zones and national deployment recognized that scientific wonder still needs practical preparation.

There is a wider lesson in the way the eclipse was experienced. Astronomers predicted its path and timing with extraordinary precision, public agencies distributed safety information, and open broadcasts allowed people far from Spain to watch. The event showed what institutions can accomplish when evidence is communicated clearly and the public is treated as capable of understanding it.

That matters at a time when online attention often rewards conspiracy, manipulation and instant outrage. The sudden darkness may have felt otherworldly, but its cause was neither mysterious nor hidden. It was explained by geometry, observed across national borders and confirmed by millions of people at once. Science did not diminish the sense of wonder; it made the experience safer and more accessible.

The commercial pressure was harder to ignore. Scarce rooms and transport became expensive as the date approached, showing how quickly a shared natural event can become available mainly to those able to pay. Public viewing sites, reliable livestreams and free safety guidance helped keep access broader than the premium tourism market.

Spain's eclipse lasted only moments, but it brought together scientific prediction, emergency planning and a vast public audience. The strongest image was not only the darkened Sun. It was the sight of people pausing together, looking upward through protective glasses and sharing an event that no government, company or political faction could manufacture or control.