The most senior miltary office in the US Armed Forces has admitted he should not have expressed his personal view that homosexuality is immoral.

His admission came after his boss, Defence Secretary Robert Gates, and leading Republican and Democratic politicians condemned his remarks.

Marine General Peter Pace, chairman of the Joint Chiefs of Staff, told the Chicago Tribune on Monday that homosexual acts are immoral and that the Armed Forces should not be a party to any form of immorality.

He was roundly criticised by gay rights activists, among them Sgt. Eric Alva, the first soldier wounded in the Iraq war, who recently came out of the closet.

However, it was an indirect rebuke from General Pace’s superior, Defence Secretary Robert Gates, that may have prompted him to admit he should have kept his views private.

Gates said that personal opinions have no place in discussion of “Don’t Ask Don’t Tell,” introduced in 1993 by then-President Bill Clinton.

The policy states that commanders may not ask the sexual orientation of service members.

Gay men and lesbians can only continue to serve only if they do not engage in homosexual acts, and keep their sexual orientation a secret.

“In expressing my support for the current policy, I also offered some personal opinions about moral conduct,” said General Pace.

“I should have focused more on my support of the policy and less on my personal moral views.”

The Democratic leader in the House of Representatives, Speaker Nancy Pelosi, said that moral judgements from General Pace were not needed. “We need the most talented people; we need the language skills. We need patriotic Americans who exist across the board in our population,” she said.

A Republican Senator and former Navy Secretary, John Warner from Virgina, said he “disagreed strongly with the chairman’s view that homosexuality is immoral.”

“Don’t Ask Don’t Tell” was a compromise between hard-core Republicans who wanted a ban on gays in the military, and Bill Clinton, who along with many Democrats believed that serving your country is not incompatible with being open about your sexuality.

The Clinton camp asserted that the resulting compromise was not a question of morality, but of attaining cohesion within combat units.

Critics say that the bill is counterproductive, and that if the law were lifted the Pentagon would find it easier to maintain the dwindling forces in Iraq and Afghanistan.

American public opinion seems to be shifting on gay people serving in the military, at a time when all branches of the Armed Forces are struggling to recruit.

A Harris Interactive survey, conducted in January, found that 55% of the 2,337 people questioned felt openly gay, bisexual or lesbian personnel should be allowed to serve.

General John Shalikashvili, chairman of the Joint Chiefs of staff when the controversial policy of “Don’t Ask, Don’t Tell” was introduced, has come out against the policy.

The general, who retired in 1997, said that conversations with gay service members, “showed me just how much the military has changed, and that gays and lesbians can be accepted by their peers.”

The retired general’s comments were backed by a Republican politician who was in charge of the US Armed Forces for four years.

William Cohen served as Defence Secretary from 1997 – 2001 under Democrat President Bill Clinton.

The US has discharged over 10,000 military personnel for being gay or lesbian since 1993.