US President George W. Bush said the agreement "clears the way to do what the American people expect us to do: to capture terrorists, to detain terrorists, to question terrorists and then to try them."
Mr Bush said he was happy that the agreement "preserves the single most potent tool we have in protecting America and foiling terrorist attacks, and that is the CIA program to question the world's most dangerous terrorists and to get their secrets."
The Bush administration had faced a rebellion from several prominent Republican senators, led by Senator John McCain and Armed Services Committee Chairman John Warner, who had openly refused to support wording put forward by the White House on the issue.
The agreement now goes for debate in Congress before it is formally adopted and signed into law by Mr Bush.
According to Republican Majority Leader Bill Frist, the agreement "meets three tests: it protects Americans by ensuring that our high value CIA program will be preserved; guarantees that classified sources and methods will not be disclosed to the terrorist detainees; and third, ensures that our military can begin to try terrorists in our custody."
US national security counsellor Stephen Hadley, one of the lead White House negotiators, said the sides were hammering out the final details "on a way to detain, question and bring to justice terrorists. It is good news and a good day for the American people."
Mr Bush said the measure also creates military commissions to try suspected terrorists -- a key element needed to try the "war-on-terror" detainees being held at the US naval base in Guantanamo Bay, Cuba.
"I hope the Congress will send me legislation before it wraps up their business next week," he added.
The accord appeared to end the feud between the White House and several rebellious Republican Senators -- among them Senator McCain, a likely 2008 presidential contender, Mr Warner, and former US Air Force lawyer Lindsey Graham.
Critics had charged that Mr Bush wanted Congress to set rules that would give legal cover to CIA interrogators so they can continue using "alternative" methods of questioning that reportedly include a simulated drowning technique known as "waterboarding," sleep deprivation, and subjecting suspects to extreme temperatures.
Senator McCain, a former navy pilot who was captured during the Vietnam war, held prisoner and tortured, said it was a matter of conscience and principle that the United States should not resort to the same tactics of their enemies.
Former US secretary of state and chairman of the joint chiefs of staff Colin Powell had also objected to the White House's proposal.
Mr Graham said the agreement will allow US officials to bring charges against terror suspects and still protect classified information.
"But we're going to do it in a way that won't come back to haunt us if our troops fall into enemy hands in the next war, which will surely be forthcoming unless humanity changes," he said.
