A German minister has been forced to apologise after making an anti-gay slur against the man tipped to be the country’s next foreign minister.

Guido Westerwelle, 47, is the leader of the Free Democrat Party. He is openly gay and came out in 2004.

His party is to form a coalition with German prime minister Angela Merkel’s Christian Democrat Party after Sunday’s election victory and he is expected to take up the role of foreign minister.

However, Peter Langner of the SPD Social Democrats told friends: “I don’t want a gay foreign minister.”

He was quickly condemned by gay groups, who saw the comment as not only homophobic but also grossly insensitive considering the Nazis’ treatment of gays.

Defending himself, Langner said he made the remark “in a private circle”.

He added: “It was inconsiderate coming immediately after the results of the election were posted and I do not have any prejudices towards any homosexual person. I am a tolerant man.

“If I have hurt anyone’s feelings with my outburst, I am deeply sorry and offer my apologies in all ways possible.”

Westerwelle revealed he had a long-term partner in 2004. He attended Merkel’s 50th birthday party with his partner, businessman Michael Mronz, who he sometimes takes on business trips.

Although not a gay rights activist, he has said that his success may be “encouraging for some young gays”.

Speaking to Berlin’s gay magazine Siegessaeule this month, he said: “I can only tell all young gays and lesbians to not be disheartened, if not everything goes their way.

“This society is changing for the good in the direction of tolerance and respect . . . though slower than I would wish.”