Sen. John McCain said Thursday that senior officials in the Bush administration had agreed to prosecute suspected terrorists using a court system similar to the military's code of justice.

Citing recent meetings with Stephen Hadley, the president's national security adviser, and other top administration officials, McCain said the White House would not insist upon legislation authorizing military commissions established by the Pentagon.

"At that time, I was under the impression that that was the administration's position," McCain said. "I hope that hadn't changed."

Such a promise would contradict testimony heard earlier this week from administration officials, who told lawmakers that Congress should not turn to the Uniformed Code of Military Justice because it would grant terrorists too many freedoms and would be unpractical on the battlefield. In their testimony, officials representing the Defense and Justice Department advocated that Congress pass legislation authorizing the military commissions.

Lawmakers and the administration agreed that legislation is necessary after the Supreme Court ruled 5 to 3 that the Pentagon's military commissions, established to prosecute suspected terrorists, violated international law and were not authorized by Congress.

Sen. John W. Warner, R-Va., chairman of the Armed Services Committee, said during a hearing that the administration needs time to smooth over "some honest differences of opinions."

Warner said he expects the White House to propose detainee legislation soon after senior officials return from the G-8 summit this month. It is "absolutely imperative" Congress pass legislation before adjourning this year, he said.

"The eyes of the world are upon us and we must set the standards," Warner said.

McCain, a member of the committee who last year led the charge to ban abuse of military detainees, said America's image was suffering because of the nation's treatment of its war prisoners.

"We will have more wars and there will be Americans who will be taken captive. If we somehow carve out exceptions to treaties to which we are signatories, then it will make it very easy for enemies to do the same to American prisoners," he said.

Active and retired judge advocate generals testifying before the committee said Congress should not ratify the military tribunals, as the administration had suggested, because it would not satisfy the Supreme Court ruling. The ruling determined that detainees should be protected under the Geneva Conventions.