It was meant to be only a “brief trip to Scandinavia,” Swedish journalist Kim Wall assured one of her New York editors.

The Nordic jaunt — a stopover en route to the new life she was planning in China — would include a visit with family, and then a fun interview with an eccentric Danish inventor who built his own submarine.

It was precisely the type of intrepid pursuit that marked her budding career.

At just 30 years old, Wall had already written about voodoo in Haiti, explored Idi Amin’s torture chambers in Uganda, and covered the effects of nuclear testing in the Marshall Islands.

She once even managed to slip into North Korea.

“She had an uncommon enthusiasm and happiness,” said Howard French, one of Wall’s journalism professors at Columbia University. “She really was that kind of person who threw herself into the fray with every enthusiasm.”

She had done this even before beginning journalism school in New York in September 2012. In August, when a gunman opened fire outside the Empire State Building, Wall rushed to the scene, recalled another Columbia professor.

A story about a charismatic amateur scientist who fancied himself a real-life Captain Nemo as he trolled Danish waters in his DIY vessel seemed tame by comparison to her other assignments — but it was still too good to pass up.

So on the evening of Aug. 10, the petite redhead dressed smartly in an orange fleece and black-and-white skirt waited on a dock on Refshaleøen, an island on the outskirts of Copenhagen.

Soon, she descended a ladder into Peter Madsen’s submarine, and never made it out alive.

Two years ago, in a dispute with volunteers who helped him build his UC3 Nautilus, Madsen sent an odd text message.

“There is a curse on Nautilus,” he wrote, according to his website. “The curse is me. There will never be peace on Nautilus as long as I exist.”

Madsen, 46, is now suspected of killing his interviewer, but what precisely happened on board the vessel remains as murky as the waters he explored.

At least initially, there seemed little for the young freelancer to fear.

Even though he had a reputation for volatility, Madsen was a local celebrity, well known, and oft-interviewed by Danish journalists.

He was a creative genius who treasured his freedom, which sometimes included “sexual experimenting in fetish groups” even though he was married and “lives with a partner he loves,” his biographer, Thomas Djursing, told The Post.

But his first love was his submarine. Madsen was trying to raise money to refurbish his 9-year-old creation, and frequently gave tours of the 60-foot-long vessel while it was docked near Copenhagen. Danish law prevented him from taking passengers out to sea. It’s unclear why he broke the rules with Wall aboard.

“We guarantee a fun, inspirational experience that will be remembered,” promised Madsen on a crowdfunding site where he said he could accommodate groups of up to 200 people for two-hour tours. But only a few people at a time could squeeze in the claustrophobic interior, with its curved, light green walls. Footage posted online shows a control room studded with an array of dials, a crudely fashioned periscope, and a warren of rooms, one with a small cot covered with a wolf-gray blanket.

According to Swedish press reports, Madsen had contempt for some reporters who he felt had belittled his accomplishments in the past. One Danish photographer called him “a crazy person.”

“I mean, making space rockets and sailing around in homemade submarines is not normal behavior, but I’ve never seen him lay a hand on anyone,” photographer Bo Tornvig told a Swedish daily. Tornvig has covered Madsen in the past.

In 2008, just as the 21-year-old Wall was settling in to her international relations studies at the London School of Economics, Madsen, then 37, was already completing work on the Nautilus, his third submarine.

Madsen was born in a small town on the western coast of Denmark in 1971, and his parents divorced when he was a toddler. Until he was 4 years old, he lived with his mother and three half-brothers, according to Djursing, the author of “Rocket Madsen: Denmark’s Do-It-Yourself Astronaut.”

Madsen then went to live with his elderly and abusive father, “and constantly moved from place to place,” Djursing said.

Did Wall know anything about the amateur scientist who had successfully launched a rocket when he was in middle school, before she set off to interview him in a submarine — a confined space with no easy exit?

Madsen’s father was a carpenter who had once constructed barracks for German soldiers occupying Denmark during the Second World War, according to press reports. His father died when Madsen was a teenager.

In a video on the crowdfunding site Indiegogo — where he sought $50,000 to repair the UC3 Nautilus — Madsen said that his fascination with submarines began when as a 12-year-old he saw “Das Boot,” a 1981 film about the German crew of a U-boat as it plows through the waters of the Atlantic during World War II.

“I was fascinated by this amazing vessel and its capabilities,” Madsen said in the video. “The whole idea of sailing underwater . . . kept me dreaming for many years.”

Madsen enrolled in engineering school, but did not complete his degree — although he still dreamed of building his own submarine and rocket.

“Peter owns very little of value, and has never owned much other than a bag of clothes and a shelf of books about rocket fuel, the Second World War and the Apollo project,” Djursing said. “He has never lived in a normal house or apartment for long, but has lived most of his life in his workplaces or in the submarine.”

Like Madsen, Wall too was obsessed.

She was born on March 23, 1987, in Trelleborg, a quaint seaside town of nearly 29,000 in southern Sweden. Her family’s Facebook photos show idyllic seascapes, brightly painted wooden houses, spirited backyard family gatherings, community runs on a sandy beach and the antics of the family’s beloved St. Bernard.

Despite its remote location, Trelleborg is oddly connected to the world and international history. It boasts one of the country’s largest ferry terminals, which connects passengers to Germany and Poland. Bolshevik leader Vladimir Lenin famously traveled through Trelleborg on his way back to the Russian Revolution after a period of exile in Switzerland in 1917.

These days, Trelleborg is probably better known for the nude statue of a woman which overlooks the nearby harbor. The statue is modeled after Uma Thurman’s grandmother — Birgit Holmquist — and depicts a woman in a strong and defiant posture. The arms and head are thrown back and the whole body seems open to experience, poised to soar.

Wall’s small-town Scandinavian roots ironically prepared her to soar, and launched her career in the wider world.

From an early age, Wall’s passion for journalism and social justice were instilled in her by her photojournalist father, some of whose Facebook postings commemorate the anniversary of the 1986 assassination of Olof Palme, Sweden’s most progressive prime minister.

Kim was born a year after the unsolved shooting, which still resonates among many progressive and liberal Swedes as the day that the country lost its innocence.

“Kim’s father was a pretty renowned photographer and a big influence on her career,” said retired Columbia professor Sandy Padwe, who beginning in the fall of 2012 taught Wall in his basic reporting class.

A March Facebook post shows Wall holding a glass of wine at a restaurant to celebrate her 30th birthday. Her father wrote in English: “Today is years since I had to take care of the girl for the first time . . . What a journey she has made ever since!”

Wall’s remarkable journey began after she graduated from the prestigious Malmö Borgarskola secondary school, whose alumni include a Swedish prime minister and the Hollywood actress Anita Ekberg. She went on to spend a year at nearby Lund University, where US Supreme Court Justice Ruth Bader Ginsburg taught herself Swedish in order to write a book on Swedish civil procedure in the 1960s.

She went on to the prestigious London School of Economics, where she earned a bachelor’s degree in political science and international relations in 2011. She also earned two graduate degrees — one in journalism in 2013 and another the next year in international affairs — both from Columbia.

By the time she left Columbia, she spoke eight languages, including Mandarin, which she hoped to put to good use this year.

Colleagues and editors told The Post that Wall spoke little about her personal life, and no one contacted by The Post could identify the boyfriend who had alerted police after she disappeared.

In one of her last emails, she told a longtime editor about her plans for the first story she would do after settling in China this month.

“I’ll be working on a long form story on neo-Maoism (all recommendations for reading and experts to interview would be so welcome!),” she wrote on June 29 to Jonathan Landreth, the managing editor of China File, the online magazine on US-China Relations at New York’s Asia Society.

Landreth, a fellow Columbia Journalism School graduate, mentored Wall after she graduated four years ago. In June, they had planned to meet for one of their usual lunches, over curry at an Indian restaurant or fries at an Upper East Side diner, he told The Post.

But Landreth was about to go on vacation, and Wall was headed off on her “brief trip.” She didn’t give him details about the curious submarine story, and it’s unclear if she was even on assignment for a specific publication when she went to interview Madsen.

Plans for lunch fell through.

For Landreth it would be the last time he heard from Wall — until the news of her disappearance and death earlier this month.

“See you the next time I’m in NYC (probably won’t be long),” she wrote in the e-mail Landreth shared with The Post.

“All my best, K.”

Now, Wall is the story, her tale more suited to the pages of a twisted Nordic crime novel. Indeed, the grisly findings are difficult to believe.

Madsen repeatedly denied killing Wall and desecrating her remains — but his story changed with each telling.

He claimed he dropped off Wall on Aug. 10 at Halvandet, the trendy dockside eatery where they met, he told authorities. He was alone on his sub when it began to experience “a minor problem with a ballast tank that turned into a major issue,” he told a local TV station.

The next day, the Danish Navy rescued him, as his pride and joy was taking on water. All smiles, he gave a thumbs-up to the press who came out to chronicle the plight of their odd local celebrity.

“I am glad, but sad that the Nautilus went down,” he told them.

Days later, the search for Wall intensified, and authorities said that Madsen changed his story.

He told them the reporter died in an accident and that he “buried” her at sea.

Police found traces of Wall’s blood in the submarine after they recovered the 40-ton vessel, which they say Madsen deliberately sank as the search for Wall went into high gear.

And then, last week, a nude headless torso of a woman was found floating in the waters off a beach south of Copenhagen.

DNA tests revealed that the torso belonged to Wall.

And she wasn’t simply dismembered. Police said that the air was deliberately squeezed from her torso, which was weighed down with pieces of metal to ensure that it would sink.

Prosecutors in Denmark said they will bring murder charges against Madsen, who is scheduled to appear in court next month. He has been in police custody since August 12 on suspicion of “negligent manslaughter,” and will undergo psychiatric testing, AFP reported.

As in many criminal cases in Denmark, much of this investigation remains behind closed doors.

Did Wall know anything about the amateur scientist who had successfully launched a rocket when he was in middle school, before she set off to interview him in a submarine — a confined space with no easy exit?

It is “a black irony that Kim, who has been in North Korea…would disappear in Denmark,” one of her colleagues wrote in the Swedish tabloid Expressen.

Other colleagues speculate that Madsen came on to the pretty journalist, perhaps she fought off his advances. “It’s a chilling reminder that women’s safety can’t be shrugged off as a problem specific to developing countries — as if the West is immune to misogyny,” Sruthi Gottipati wrote in The Guardian.

Her family remains in shock that “something could happen to her in Copenhagen, just a few kilometres from her childhood home,” her mother Ingrid wrote in a Facebook post after Wall’s remains were identified.

Her father, Joachim Wall, told The Post in an e-mail that he is still too numb to speak at length about his beloved daughter.

“We haven’t taken in all of what has happened,” he wrote.