(Reuters) - Lawmakers are steeling for a public battle against the possible transfer of Taliban detainees out of Guantanamo Bay prison, a key step in the Obama administration's bid to broker a peace deal ending the war in Afghanistan.

Congressional opposition is gaining steam, especially among Republicans but also among some senior Democrats, to the potential transfer to Qatar of five senior Taliban prisoners, a good-faith move that could set the stage for eventual political talks between the Taliban and Afghan government.

One Republican lawmaker said public opposition would escalate sharply if and when the administration formally notified Congress it intends to transfer the prisoners, who come from the highest ranks of the Afghan militant movement.

If they do that, then all hell breaks loose. There's just no way, the lawmaker said on condition of anonymity.

While Congress does not approve such transfers, a 30-day waiting period is required before they take place. The White House might rethink such a risky move if serious bipartisan friction emerged in a presidential election year.

Yet efforts to broker a peace deal between the government of Afghan President Hamid Karzai and the Taliban have become central to U.S. strategy in Afghanistan, where insurgents remain capable of launching damaging attacks even after more than a decade of foreign military efforts.

Western nations have long planned to pull most combat troops from Afghanistan by the end of 2014. But as fatigue and the financial burden of the war mount, it appears NATO nations will seek to curtail their Afghan missions even earlier.

The Pentagon said U.S. forces will stop taking a lead role in combat operations next year but will continue to support Afghan combat missions under a plan announced by Defense Secretary Leon Panetta that has worried Afghans and surprised allies.

A fast-approaching departure for foreign troops is one reason why the congressional take on the reconciliation bid - and especially the transfer of prisoners some lawmakers fear will re-emerge on the battlefield - is so skeptical.

It would seem that the Taliban are free to wait the president out and recoup their senior leaders without obtaining any real guarantee for a peaceful, stable or free Afghanistan, said Claude Chafin, a spokesman for Rep. Buck McKeon, R-Calif., chairman of the House Armed Services Committee.

Lawmakers are also reluctant to accept a plan that, if successful, would likely bring a hard-line Islamist group with a history of oppressing women and committing human rights violations back into power in some capacity.

If this happens, we have crossed a red line that we will never be able to get back. It is a serious doctrinal change for the United States government, Rep. Mike Rogers, R-Texas, chairman of the House Select Committee on Intelligence, said during a hearing that included senior intelligence officials.

Recent intelligence analysis has suggested that while the Taliban has been weakened, militants are not ready to abandon their fight against Western troops.

In fact it's saying we're all in deep kimchi, and (administration officials) feel like this is their last grasp at a straw to put something together, said the Republican lawmaker speaking on condition of anonymity.

The administration has said a transfer, if it occurs, will be a national decision made in consultation with Congress.

DOUBTS ABOUT DANGEROUS DETAINEES

Administration officials briefed select lawmakers from both houses of Congress this week on the heels of a round of shuttle diplomacy led by Marc Grossman, Obama's envoy for Afghanistan and Pakistan. The flurry of meetings was aimed at enacting a series of confidence-building measures, including a detainee transfer, which could lead to substantive peace talks.

Speaking in Kabul last month, Grossman said the administration had not made a decision to move the five prisoners, whose fate has been a priority for the Taliban. He said any transfer would first have to be agreed upon with Congress.

Some Democrats are also deeply worried.

We have an agreement that we won't negotiate with terrorists, Senate Intelligence Committee Chairwoman Dianne Feinstein, D-Calif., told Reuters last week.

The White House has laid out conditions that the Taliban would have to respect if any final deal were to be struck - which officials acknowledge is a long shot - including renouncing violence and embracing the Afghan constitution.

Some members of Congress and the U.S. intelligence community have raised questions about the potential hand-over of one detainee in particular, Mullah Mohammed Fazl, a high-risk detainee held at Guantanamo since early 2002.

As a senior commander of the Taliban army, Fazl is alleged to be responsible for the killing of thousands of Afghanistan's minority Shi'ite Muslims between 1998 and 2001.

According to U.S. military documents made public by WikiLeaks, he was also on the scene of a November 2001 prison riot that killed CIA operative Johnny Micheal Spann, the first American to die in combat in the Afghan war.

A senior administration official, speaking on condition of anonymity last month, said he knew of no evidence Fazl was involved in the death of Spann, who was surrounded and killed by rioting prisoners.

Do we have footage of him pulling the trigger? No. Do we know he was involved in the uprising that led to (Spann's) death? Yes, said a Republican lawmaker who spoke on condition of anonymity. They're trying to parse words there.

The administration said this week it had asked intelligence agencies for additional assessments of the risks of transferring the five detainees to a third country.

(Writing by Missy Ryan; editing by Todd Eastham and Eric Beech)