When Kim Min-seok gave the go-ahead in June 2016 to publish a 90-second clip of a children's song, he had no idea what he was unleashing.

It became a global phenomenon, clocking up more than 16 billion views - YouTube's most watched video ever.

That song was the incredibly catchy Baby Shark.

Not only has it captivated toddlers and terrorised adults around the world, it laid the foundations for its creator Pinkfong to become a media business worth hundreds of millions of dollars.

“We didn’t expect it to stand out from our other content," said Kim Min-seok, Pinkfong's chief executive, told the BBC from the firm's headquarters in Seoul.

"But looking back, it became a major turning point that set the stage for our global journey.”

On Tuesday, that journey took Pinkfong to the South Korean stock market, where its shares rose by more than 9% on their debut, giving it a valuation of more than $400m (£304m).

Founded in 2010 as SmartStudy, the firm made digital content for children up to 12 years of age.

It had just three employees, including Mr Kim and the firm's chief technology officer, Dongwoo Son.

Pinkfong went through several major overhauls, including shifting its focus to toddlers. The firm grew to around 100 employees and prioritised simpler, learning-based games and content. And that's when Baby Shark emerged, Mr Kim said.

Baby Shark is believed to have originated in the US in the 1970s and was often sung at children's summer camps. The song, which repeats the phrase 'Baby shark, doo, doo, doo, doo, doo, doo' is attracted to children, though possibly annoying for adults.

This catchy tune gained traction through children's events and social media, turning into a viral sensation.

Mr Kim insists Pinkfong can grow beyond Baby Shark, with the song currently accounting for about a quarter of its revenue. Meanwhile, their franchise Bebefinn generates roughly 40% of earnings.

Pinkfong aims to utilize its stock market debut capital to expand its lineup of films and characters while ensuring its staying power beyond a single hit.