It was 4 July, and I was watching the Stars and Stripes hoisted up a flagpole by men in uniform as a country singer in cowboy boots and hat belted out my national anthem. This was followed by a moment of prayer, asking God to bless the US president. Then came a patriotic salute to American musical tradition with a band made up of US Army members and a community singalong of God Bless America.

If I was anywhere in the United States on Independence Day, this scene might have made sense. Instead, I was some 7,400km away, in the hills of northern Denmark, experiencing a surreal salute to my home country – in my adopted country – that married all the passion of the American dream with the family-friendly hygge of a Danish picnic in a park.

This is the Rebild Festival – arguably the largest Independence Day celebration outside the US. The unlikely occasion has drawn thousands of red-white-and-blue revellers to Denmark’s Rebild region, a municipality about 30km south of Aalborg, since 1912.

But, why Denmark? It’s a story rooted in homesickness from an age when leaving Europe for the US meant saying goodbye to friends, relatives and country – often forever.

You may also be interested in:

• What to do when hygge no longer works

• The curious story of Denmark's rebel cakes

• A 2,000-year-old unsolved mystery

In the late 19th and early 20th Centuries, there was a mass exodus of Danes to the US. These emigrants were spurred by better economic opportunities abroad as well by the Mormon religion, which thousands of Danes converted to. The Rebild National Park Society, the Danish-American friendship group that organises the Rebild Festival, estimates some 300,000 people left Denmark for the US by 1912.

“Many of them left Denmark when times were hard. They came to America and some of them took that freedom and opportunity and made something of themselves, and they were really proud and they were grateful to America,” said Niels Voigt Guldbjerg, president of the Danish American Club in Denmark, who lived in the US for 32 years. “They were so far away back then that it meant more when they came back to Denmark, and they loved America so much because America gave them the opportunity that they didn’t get at home.”

One of those emigrants was Max Henius, a biochemist who set up shop in Chicago and went on to found the successful American Brewing Academy, teaching the art of European-style fermentation to pre-Prohibition–era brewmasters.

While returning to Denmark for these emigrants was a rare, expensive and time-consuming journey, taking several weeks by ship, those who found their fortunes abroad were particularly motivated to return and recognise both the importance of their heritage and the opportunities that the US had afforded them. It was this group of newly minted Americans, led by Henius, that bought a 200-acre parcel of land in northern Denmark in 1911 as a place of homecoming for all Danish-Americans. In 1912, they donated the land to Danish king Christian X, who in turn established Rebild Bakker (Rebild National Park) as a natural retreat for all Danes to enjoy.

But the gift came with a catch.

Every year, Henius insisted, the park must hold a festival celebrating American Independence Day as a symbol of friendship between the two countries. The national park would also serve as a place for American Danes to return and always feel at home, whether meeting with relatives still in Denmark or celebrating the American dream with like-minded friends. The result, today, is a trippy mishmash of traditions that brings together the very Danish love of singing and snaps (aquavit).

At its rain-soaked inauguration in 1912, the Rebild Festival drew more than 10,000 participants to the park, some 1,000 of whom had made the long journey by ship from the US to celebrate their heritage, according to the Rebild National Park Society. At its post-war peak in 1948, the celebration attracted around 50,000 guests. Notable attendees over the years have included US Supreme Court Chief Justice Earl Warren (1955); animator Walt Disney (1961); former US president Richard Nixon and Danish king Frederik IX (1962); six-time Grammy Award-winning singer Dionne Warwick (1988); American television and film actor Richard Chamberlain (1990); and US Attorney General Janet Reno (1994).

Today, the festival of friendship has morphed into a nearly week-long celebration of get-togethers, galas and ceremonies throughout the Rebild region that continues to cement the ties that bind the two countries. It’s a place for all people interested in the US – whether they’ve been to there or not – to gather and celebrate.

At the 4 July opening tent luncheon this year, I met Rebild Festival enthusiast Helle Agerbak Lyngaa, 52, who was bedecked head to toe in patriotic regalia, including American flag antennae and a sweatshirt stating “Made in America” – though she’s 100% Danish. She settled herself at my table and instantly made friends with our surrounding seatmates: a handful of newcomers; a man who has attended the affair every year since 1948; and three generations of Danes with a love for the Rebild Festival.

“You need to find some kindred spirits, which is what we do here,” she told me.

“[The post-luncheon event] is the main thing, the icing on the cake,” said Lyngaa, who has attended or been involved in the annual event since she was about five years old and is a long-time member of the Danish American Club and the Rebild Society. “But I find all the other events [in the weeks leading up to the 4 July festival] at least as important, because that’s where you get the friendships.”

She continued: “This is a lot about tradition. A lot of Danish-Americans coming home are coming for the memories – and coming because they long for what they’ve left. There’s still this longing for tradition.”

The tent luncheon, a two hour-long feast of pickled herring, smorrebrød and Aalborg snaps, was punctuated by toasting songs ­and a bit of formality as a handful of Americans and local dignitaries were feted for their contributions to the festivities.

“There was a time in the US when people weren’t as interested in their heritage and where they were from and trying not to speak their native language at home,” said American Ed Bladt, president of the Delaware Valley Rebild Chapter. Though he lives in and is from the US, Bladt, who is married to a Dane, speaks Danish at home and his children and grandchildren’s first words were “skål”, or “cheers”. He was honoured this year with several awards, including being proclaimed Mayor of Aalborg – Henius’ home city – for a day in recognition for his efforts in promoting Danish-American relationships. Now, Bladt says, it’s come full circle: there is a renewed interest in heritage, perhaps because of the presence of technology that makes it easier to keep connections going strong.

“When you get to Denmark, everyone wants you to come and visit and you can’t always do that because they’re so many people, so we go to Rebild,” Bladt told me. “Rebild is one place that we can get together and meet [with all Danish friends and family at once].”

Though the 2019 event was cold and wet, hundreds of people poured out of the luncheon tent and made their way up a trail lined by US state flags to the main attraction in the hills of the park. We were greeted by the ceremonial raising of American and Danish flags (accompanied by more singing), and a prayer in Danish emphasising the ties between the two countries. Other speeches followed, in between community singalongs of traditional Danish ballads and a rendition of God Bless America.

The scene was surreal. I was staring at the Stars and Stripes while shivering under a parka in a downpour. But for Danes, like those who attended the first festival, this was nothing. A common saying in Denmark is, “there’s no bad weather, only bad clothing” and it showed, as perhaps 1,000 revellers were at this post-luncheon outdoor event in the park.

Although the numbers of celebrants since Henius’ days may have dwindled – with about 2,000 attendees in sunny years, and 7,500 guests at the event’s 100th anniversary in 2012, according to Rebild National Park Society Secretary General Lars Bisgaard – the passion for all things American here has not.

“I think with culture, in some ways it’s like fashion. In 20 or 30 years, trends cycle, and I think they will come back, it’s just a matter of attracting people,” Lyngaa mused. “I think the Rebild [National Park] Society will still be there in 100 years, maybe not in the same shape and form, but we’ll always be there. We long for the adventure of big America, and Americans long for their tradition and roots in Denmark. It will always be there.”

Join more than three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "The Essential List". A handpicked selection of stories from BBC Future, Culture, Worklife and Travel, delivered to your inbox every Friday.