In a sign of possible differences among top military officials, Army and Air Force chiefs voiced concern Tuesday about ending a ban on gays serving openly in the armed forces while the country is in the middle of two wars.

Army Gen. George W. Casey Jr. and Air Force Gen. Norton A. Schwartz both told Congress that they supported the Pentagon’s plan to spend a year studying a change in the policy that allows gays to serve only as long as they keep their preferences hidden.

However, both generals were mum about their own views on gays in the military, and neither followed the lead of Adm. Michael G. Mullen, chairman of the Joint Chiefs of Staff, who this month said gays should be allowed to serve openly.

The appearances by Schwartz and Casey will be followed Wednesday by those of Adm. Gary Roughead, the chief of naval operations, and Gen. James Conway, the Marine commandant.

Lawmakers and advocates are carefully watching the congressional testimony, trying to gauge where the various service chiefs stand on the issue of gays in the military as a barometer for the eventual outcome.

Opponents of the ban, including President Obama and many congressional Democrats, want to quickly overturn it. However, backers of the ban, including some congressional Republicans, are looking to military officials for possible support for keeping the policy in place.

Casey and Schwartz carefully followed a middle path outlined in recent months by Defense Secretary Robert M. Gates, who supports Obama’s call to end the ban but wants any change to be made slowly and studied carefully.

Obama said in his State of the Union address in January that he wanted the 17-year-old policy known as “don’t ask, don’t tell” rescinded this year. Military officials this month said they intended to spend the year on a study to assess the effects of a policy change.

Appearing before the Senate Armed Services Committee, Casey said he had reservations about the effect of a change on deployed troops.

“I do have serious concerns about the impact of repeal of the law on a force that is fully engaged in two wars and has been at war for 8 1/2 years,” Casey said. “We just don’t know the impacts on readiness and military effectiveness.”

“Exactly,” murmured Sen. John McCain (R-Ariz.).

Appearing at the same time before the House Armed Services Committee, Schwartz said there were few reliable surveys about what airmen and their families thought of the policy. Schwartz acknowledged that Obama had stated he wanted the law to be changed but said potential “complications” should be examined first.

“This is not the time to perturb the force that is, at the moment, stretched by demands in Iraq and Afghanistan and elsewhere without careful deliberation,” Schwartz said.

As part of the 1993 law creating the “don’t ask, don’t tell” policy, the Pentagon is required to remove service members accused of being gay or admitting so. More than 14,000 service members have been booted out for those reasons.

Sen. Carl Levin (D-Mich.), chairman of the Armed Services Committee, may push for a congressional moratorium on discharges during the Pentagon’s study.

But McCain, the ranking Republican on the committee, said that the moratorium would circumvent the purpose of the study.

On Monday, Army Gen. Ray Odierno, the top commander in Iraq, voiced his support for the Pentagon policy study. But unlike Casey, Odierno voiced personal support for changing the policy.

“My opinion is everyone should be allowed to serve, as long as we’re still able to fight our wars and we’re able to have forces that are capable of doing whatever we’re asked to do,” Odierno said.

But in a reflection of the complex military thinking on the issue, Odierno, like Casey, said his primary concern was for troops serving in combat.

“We’re in two wars right now. So I want to see it done properly,” Odierno said.

julian.barnes@latimes.com