WASHINGTON — Gay troops can serve openly in the armed forces without harming the military’s ability to fight, the Pentagon’s top leaders declared Tuesday, calling for the 17-year-old “don’t ask, don’t tell” ban to be scrapped and pointing to a new survey to show most troops won’t mind.

President Barack Obama, citing the troop poll, urged the Senate to repeal the ban before adjourning in the next few weeks, but there is still no indication GOP objections can be overcome with just a few weeks left in the postelection lame-duck session.

Still, the survey, which found that some two-thirds of troops don’t care if the ban is lifted, put new pressure on Republican opponents, led by Sen. John McCain, who say efforts to repeal the law are politically motivated and dangerous in a time of war.

Defense Secretary Robert Gates said the ban on openly gay military service “requires people to lie,” and he called for quick Senate action.

“We spend a lot of time in the military talking about integrity and honor and values. Telling the truth is a pretty important value in that scale,” Gates said as he released the Pentagon study showing that most people currently in uniform don’t care about the ban.

Senate Democrats plan to force a vote in December.

Although historic, Tuesday’s recommendation came with a caveat that also frustrates many supporters of repeal. Gates wants an indefinite grace period while the Pentagon prepares for the change and phases it in.

“It would be unwise to push ahead with full implementation of repeal before more can be done to prepare the force, in particular those ground combat specialties and units,” he said.

Critics led by McCain say the Pentagon’s report doesn’t address risks to morale and fighting mettle.