Sweden's royal family has taken part in ceremonies Tuesday marking 500 years since the Scandinavian country emerged as an independent nation.

King Carl XVI Gustaf and Queen Silvia were first in the town of Strangnas, 37 miles west of the Swedish capital, Stockholm, where Gustav Vasa was elected king of Sweden in 1523.

His election ended the so-called Kalmar Union with Norway and Denmark, which had endured since the 14th century. Sweden was eventually transformed from an elective monarchy into a hereditary monarchy, where the crown would be passed on from father to son.

EXPLOSION AT SWEDISH AMMUNITION FACTORY INJURES AT LEAST 1, ALLEGEDLY AN INDUSTRIAL ACCIDENT

On Tuesday morning, the royal couple, Prime Minister Ulf Kristersson and Andreas Norlen, speaker of Sweden's parliament, arrived at the Gothic-style cathedral, built between 1291 and 1340, which is in the heart of Strangnas, a quiet town with a population of about 13,000.

In Stockholm, Crown Princess Victoria appeared in national dress, and her husband, Prince Daniel, opened the gates of the downtown palace with free entry to the castle and its museums as is customary on June 6, Sweden's National Day.

Swedens King Carl Gustaf

Sweden's King Carl Gustaf and Queen Silvia visit Strangnas, Sweden, on June 6, 2023, to celebrate the 500th anniversary of Gustav Vasa becoming Sweden’s king, marking the foundation of Sweden as an independent nation.  (Pontus Lundahl/TT News Agency via AP)

Victoria and Daniel held hands with their children, Princess Estelle and Prince Oscar, as they declared the palace open. Hundreds, some waving Swedish blue-and-yellow flags, rushed inside.

SWEDES PASS ANTI-TERROR LEGISLATION, LIKELY TO HELP NATO MEMBERSHIP BID

In 1980, the order of succession changed, making Victoria, the oldest of King Carl XVI Gustaf’s three children, first in line to the throne.

Kristersson said that the country of 10 million had become "a modern national state."

To conclude the day, the monarch will ride from the royal palace in a horse-drawn carriage through part of downtown Stockholm to Skansen, an open-air museum, showcasing the whole of Sweden with houses from every part of the country.

CLICK HERE TO GET THE FOX NEWS APP 

Carl Gustaf who ascended the throne on Sept. 15, 1973 and is the longest-reigning monarch in Swedish history, will give a speech there.

Later this year, the king, aged 77, will celebrate 50 years on the throne.

Sweden's royal family is popular and the monarchy enjoys widespread support, despite the egalitarianism that otherwise characterizes society in the Nordic country.