Image copyright Shutterstock Image caption The star became a heartthrob thanks to his suave appearance on Jason King

The actor Peter Wyngarde has died aged 90, his agent has confirmed.

Wyngarde played dandy detective Jason King in the 1970s TV show of the same name - which was a partial inspiration for the Austin Powers films.

He had numerous stage roles, as well as playing the gold-masked Klytus in Flash Gordon and Timanov in Doctor Who.

His agent and manager, Thomas Bowington, described him as "one of the most unique, original and creative actors" he had seen.

Image caption Wyngarde starred as Timanov in Doctor Who: Planet of Fire

"As a man, there were few things in life he didn't know."

"I sometimes nicknamed him The King because he simply knew everything," Bowington added.

Wyngarde started his career on stage, in a production on Noel Cowards' Present Laughter at Birmingham's Theatre Royal in 1947; and later starred opposite Richard Burton in the big-screen adaptation of Alexander the Great.

In 1959, he starred in ITV's South - which some have claimed was the first gay drama on British television.

Set during the US Civil War, it featured Wyngarde as a Polish army lieutenant Jan Wicziewsky, who must decide who he loves: Miss Regina, a plantation owner's niece; or a tall, rugged officer called Eric MacClure.

Broadcast live at a time when homosexuality had not been decriminalised in the UK, the drama received scathing reviews in the press.

"I do NOT see anything attractive in the agonies and ecstasies of a pervert, especially in close-up in my living room," noted The Daily Sketch's critic.

"I think you have to give Wyngarde a massive pat on the back in terms of the bravery in taking this role," said BFI curator Simon McCallum when South was rediscovered five years ago.

The furore over the programme did not affect the actor's career, and he guest-starred in a number of 1960s television shows including The Saint, The Prisoner and The Avengers before debuting Jason King in the spy drama Department S.

The character proved so popular that Wyngarde got a spin-off series, which made him a household name in the US and Australia.

He started his own fashion column in a daily newspaper and, after Australian women voted him the man they'd most like to have an affair with, was mobbed at Sydney airport.

"It was one of the most terrifying experiences I can remember," he later recalled. "They got me to the ground, tore my clothes, debagged me... I was in hospital for three days."

Image copyright Rex Features Image caption Jason King was a writer-turned-sleuth-turned-ladies-man

Image copyright Getty Images Image caption The star battled alcohol problems in the 70s and 80s

Wyngarde was briefly married to actress Dorinda Stevens in the 1950s, and then had a long-term relationship with actor Alan Bates.

His career suffered a setback in 1975 when he was arrested and convicted of "an act of gross indecency" with a lorry driver. He was fined £75 by magistrates under his real name Cyril Louis Goldbert.

The star said the conviction upset him deeply, but did not affect his career. However, his days as a leading man were largely finished.

He attributed his decline to type-casting by "small-minded people", but homophobia was undoubtedly a factor.

King remained his best-known character, a globe-trotting playboy with an astonishing array of outfits. And it wasn't just his sartorial extravagance that inspired Mike Myers to create Austin Powers: King even uttered the phrase "groovy, baby" in one episode.

Image copyright Getty Images Image caption Actress Kate O'Mara co-starred in the Jason King episode A Kiss for a Beautiful Killer

"I decided Jason King was going to be an extension of me," he once said. "I was inclined to be a bit of a dandy - I used to go to the tailor with my designs."

However, he took the character's lifestyle a bit too literally, battling alcoholism in the 1980s. He only quit after cutting ties with a close friend in a fight he couldn't remember.

"Jason King had champagne and strawberries for breakfast, just as I did myself," he told The Observer in 1993.

"I drank myself to a standstill. When I think about it now, I'm amazed I'm still here."

Wyngarde died at Chelsea and Westminster Hospital in London after being unwell for a few months.

His agent said that, despite his age, the actor had roles and appearances lined up for the coming year.

Mark Gattiss was among those paying tribute on Twitter.

"What a life. What a legend. Jason King is dead. Long live Jason King!"

Fellow Doctor Who writer Paul Cornell also paid tribute, acknowledging that many details of Wyngarde's life, including his place of birth and parentage, were unclear.

"It's terrible and impossible that #peterwyngarde is dead," he wrote, linking to the star's uncharacteristically caveat-heavy Wikipedia page.

"Such an extraordinary, detail-disputed, life. He was oddly magnificent."

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.