Sir Ian McKellen has said that Britain has “already had one or two gay Prime Ministers.”

In an interview with Seven magazine the X-Men and Lord Of The Rings star did not name names.

“I think openly gay politicians are the standard, rather than not, in all parties these days. Eventually it’s very likely that one of them will become a leader,” he said.

The most likely openly gay and lesbian politicians to run for their party leadership are in the Conservative party. There are two gay men in the Shadow Cabinet: Nick Herbert and Alan Duncan.

Lord Mandelson was the first gay person to serve in the Cabinet since 2001 when he became Business Secretary in October.

However, as a member of the Lords he cannot by convention be Prime Minister, and he would be unlikely to garner widespread support in the Labour party in any event.

There are only a dozen out gay MPs, three openly gay peers and one lesbian, Angela Eagle MP, in either House.

A recent poll found that 75% of British people would vote for a gay Prime Minister.

Women were slightly more in favour than men (79% to 70%).

Support was highest among 35 to 44 year olds (85%) and lowest among people over 65 (58%).

Among 18 to 24 year olds it was 75%.

Last year a gay member of the London Assembly claimed that former British Prime Minister Sir Edward Heath was warned to stop having sex with men in public.

Brian Coleman, a Conservative, claims that Sir Edward was warned by police to stop cruising for sex as part of a vetting process in 1955.

That year he became a Privy Councillor and Chief Whip under Prime Minister Anthony Eden.

“The late Ted Heath obtained the highest office of state after he was supposedly advised to cease his cottaging activities in the 1950s,” Mr Coleman wrote on the New Statesman’s website.

He claims that the police warning was common knowledge in the Tory party.

Senior Conservative MPs denied that Sir Edward was gay.

Sir Peter Tapsell, who became an MP in 1959, told The Mirror: “I knew him well and would be astonished if he was a practising homosexual.”

Sir Edward’s successor as MP for Bexley and Old Sidcup, Derek Conway, said:

“Ted was wedded to politics. He didn’t have a great deal of companionship but there are people capable of getting on with their lives without companionship.”

Sir Edward led the Conservative party from 1965 to 1975, and was Prime Minister from 1970 to 1974.

He never married and while many rumours about his sexuality circulated, it was generally thought he was married to his job.

Heath died in 2005 aged 89.