After weeks of gray, soggy weather, the skies parted just in time — like a gift from the Norse gods — for Friday’s state dinner honoring five Nordic countries: Denmark, Finland, Iceland, Norway and Sweden.

The unusual five-in-one dinner capped a one-day summit celebrating the relationship between the United States and the small countries that gave the world, as President Obama playfully noted in his welcoming remarks, Hans Christian Andersen, Legos, Scandinavian design, ABBA and Angry Birds.

Finnish President Sauli Niinisto and four prime ministers — Sigurdur Ingi Johannsson of Iceland, Lars Lokke Rasmussen of Denmark, Stefan Lofven of Sweden and Erna Solberg of Norway — were joined by 350 guests under an imposing tent on the South Lawn. The evening was the 12th official state dinner of the administration (and likely one of its last) and an elegant “thank you” for the hospitality the Obamas received during a 2013 visit to the region.

“We are grateful for our friendship with the Nordic people — even if we do sometimes get jealous about how perfect they seem to be,” a lighthearted Obama said in his toast. “If you’ve visited any of these Nordic countries, everything is orderly, everything is clean, everybody’s well-behaved. It even prompted a best-selling book called ‘The Almost Nearly Perfect People.’ ”

Iceland’s Johannsson matched his host’s levity. “We do not hide behind our apparent lack of superpower status,” he said in his toast. “What we lack in manpower, we make up in volcanos. We are still figuring out how to aim them.”

By contrast, the daytime summit at the White House was full of the serious diplomacy that marks these affairs: discussions about terrorism, climate change, clean energy and Europe’s ongoing refugee crisis. There was, as expected, plenty of consensus and few fireworks. “I thought this was a very useful and important conversation,” Obama told reporters Friday afternoon, “although there was probably too much agreement to make for as exciting a multilateral meeting as I sometimes participate in.”

The elephant in the room (or bear in the corner) was the absence of Russia. The relationship between Russia and its neighbors has become increasingly tense; the absence of the Russians at this or other recent Nordic summits means a lot of talk but no significant diplomatic inroads.

Actors like Will Ferrell, Aziz Ansari, Tracee Ellis Ross and others flocked to the White House for a state dinner honoring five Nordic countries. (The Washington Post)

The dinner, on the other hand, was a light-hearted affair with a number of celebrities on the guest list: comedians David Letterman, Will Ferrell, Aziz Ansari and Billy Eichner; actresses Connie Britton, Allison Williams, Bellamy Young and Tracee Ellis Ross; actors Kyle MacLachlan and Joel Kinnaman; musicians Janelle Monae, Common and Demi Lovato; model Miranda Kerr; and celebrity chef Marcus Samuelsson.

Both Kinnaman and Ferrell have Swedish connections.

The “House of Cards” actor was born in Stockholm and is an enthusiastic informal ambassador: “We are a friendly country, well-educated and strong bearers of democracy in the world.”

Ferrell married a Swedish actress, Viveca Paulin, which landed the couple their first White House dinner invitation. “I hope we don’t do anything wrong,” he joked.

“Today” weatherman Al Roker’s Nordic ties? He said he’s “frolicked on the fjords . . . actually, I drive a Fjord.” (Ba-da-boom!)

Britton, on the other hand, had no clue how she landed on the list. The “Nashville” actress attended the White House Easter egg roll and the White House correspondents’ dinner. “I’m a groupie at this point.”

More traditional VIPs included Vice President Biden, Secretary of State John F. Kerry, Planned Parenthood President Cecile Richards and Washington philanthropists Adrienne Arsht and Mark Ein.

First lady Michelle Obama wore a blush, off-the-shoulder gown by designer Naeem Khan, but that was about the only sign of spring at the dinner. Instead, the White House decided on a design inspired by the northern lights and winter sky. (“As you can see, winter is coming,” joked Obama.) Huge carved ice vases greeted guests as they arrived, and guests sat at rustic-wood rectangular tables with woven runners instead of more formal tablecloths. Loose arrangements of field flowers were displayed in crystal vases and taller ice columns, illuminated by hand-rolled beeswax candles.

The menu was a mix of American and Nordic favorites, beginning with mini chicken and waffles, deviled eggs and aquavit seafood appetizers. The first course featured salt-cured Atlantic tuna and vegetables from the White House garden and was followed by the main course of braised short ribs, hot kale and thyme dumplings. The pastry chef clearly had fun: As a nod to the fishing industry so important to all the countries, dessert featured an edible fishing boat made with chocolate and gum paste surrounded by chocolate fish and shellfish, mini tarts, cookies and other pastries.

The evening ended with a performance by pop star Lovato.