Dressed in white-tie attire for the dinner, King Frederik donned his military uniform, while his wife Queen Mary wowed in a lavender gown by Birgit Hallstein, first worn in 2015, and made her debut in the Pearl Poire tiara.
King Frederik and Queen Mary have had a whole day of engagements, arriving at Honnørbryggen in Oslo for an official welcome ceremony on Tuesday morning, travelling by sea on the Royal Ship Dannebrog.
This was followed by a meeting at the royal palace before attending a wreath-laying service to commemorate victims of the Second World War.
You may also like
The king and queen then paid a visit to the Norwegian Parliament (Storting) before having lunch at the Royal Palace in Oslo.
The couple were then joined by Crown Prince Haakon and Crown Princess Mette-Marit at Oslo Science City ahead of the state banquet.
See all of the best photos from the glittering dinner…
18
King Frederik and Queen Mary were the guests of honour as King Harald V and Queen Sonja hosted them at a glittering gala dinner at the Royal Palace in Oslo, with the Norwegian king delivering a speech.
Harald, 87, has reigned since 1991 and celebrated his Silver Jubilee in 2016.
28
The Norwegian and Danish royal families have long shared a close connection, with Queen Margrethe and King Harald being second cousins.
Crown Prince Haakon and Crown Princess Mette-Marit are also godparents to Queen Mary and King Frederik's eldest son and future king, Crown Prince Christian.
38
Frederik and Mary exchanged smiles as King Harald referenced their milestone wedding anniversary in his speech, saying: "Dear Mary, you took on a big task when you went and fell in love with this sporty Dane. You gave up a lot that was safe and familiar. You made Denmark and the Danes your own heartland and heartland. I know that you have also been a great support for our beloved Queen Margrethe.
"Just today the two of you have been married for 20 years - surely that deserves a round of applause? We think it's very nice that you chose to celebrate your wedding anniversary here with us tonight!"
48
When it was King Frederik's turn to deliver his address, he paid tribute to the two nations' endearing friendship, saying: "Your Majesties, dear Uncle Harald and Aunt Sonja.
"Mary and I always look forward to visiting Norway. We 'enjoy ourselves' with you and the Crown Prince Couple, because we are not just neighbors and colleagues, but family and friends.
"Our countries share values, culture and history, and the Danish-Norwegian ties are as strong as few. Mary and I will do everything in our power, now and in the future, to cherish all that binds us together. "
58
The Danish and Norwegian royals dined in the palace's Banqueting Hall, where they were joined by more than 200 guests.
68
Queen Sonja, who arrived arm-in-arm with King Frederik, looked elegant in a coral-coloured gown with pleated detailing on its voluminous skirt and cape.
78
Ahead of her arrival at the Royal Palace, Queen Mary was pictured as she stepped off the Royal Ship Dannebrog. For the first time ever, the royal wore the Pearl Poire tiara - a favourite of her mother-in-law Queen Margrethe.
The Pearl Poire tiara is part of a suite that became synonymous with Queen Margrethe during her 52-year reign. The diamond and pearl headpiece was commissioned as a wedding gift from King Frederich Wilhelm III of Prussia to his daughter, Princess Louise, upon her marriage to Prince Frederick of the Netherlands in 1825.
88
Mary looked exquisite in a lavender evening gown by one of her go-to dressmakers, Birgit Hallstein. She first sported the satin dress for Prince Carl Philip and Princess Sofia's wedding in 2015, and it appears to have been reworked since then, with added sheer sleeves and an organza overlay.
LISTEN: Prince Harry sent Invictus Service tickets to dad King Charles and brother Prince William
Sign up to HELLO! Daily for all the latest and best royal coverage
By entering your details, you are agreeing to HELLO! Magazine User Data Protection Policy. You can unsubscribe at any time. For more information, please click here.