With Republicans poised to take over the Senate next month, President Obama is going to have to work with some of his harshest critics if he wants to fulfill his pledge to close Guantanamo Bay before he leaves office. But a few top Republicans are willing to help him try.

"This next Congress might not be as friendly to them as previous Congresses," said Melina Milazzo, senior policy counsel for the Center for Victims of Torture, a Washington-based human rights group. "... They're going to have to really work closely with Congress to keep everything that they currently have [to close Guantanamo]."

The president's quest has been a tough, slow slog. There were 242 detainees when Obama took office, and he's released more than 100 inmates during the past six years. But to finish the job, the president would have to transfer even more than that--136--in a little more than two years.

To finish the job of releasing Guantanamo inmates, the president would have to transfer 136 in a little more than two years.

While closing Guantanamo Bay is an issue that divides Republicans, Sen. John McCain said they've got a simple request: Give us a plan.

"That's the problem, we need a plan. ...That's the problem is there's never been a plan," said the Arizona Republican, who will chair the Armed Services Committee next year. The committee is the starting point for detainee policy. McCain added that he's long supported closing the Cuban prison.

(Related: Six Guantanamo Detainees Released to Uruguay)

Currently, the administration sends detainees cleared for transfer back to their home country, or to other countries that agree to take them. When that happens, Defense Secretary Chuck Hagel must notify lawmakers 30 days ahead of a detainee being moved out of Guantanamo Bay, and he must be able to assure lawmakers that they won't pose a security threat.

The 2015 National Defense Authorization Act, expected to be signed by the president this week, lifts a ban on transferring detainees to Yemen. Yemenis account for roughly half of Guantanamo Bay detainees, and lawmakers have voiced skepticism about sending detainees to Yemen because of instability within the country.

The administration, however, wants to go a step further by transferring some detainees to the United States. But where the detainees would go, what kind of trial they would get, or even if the administration should be able to move detainees into the U.S., is a bitter point of contention.

On one side, there are Republicans, including McCain and Sen. Lindsey Graham, who have said they are open to bringing detainees into the United States.

Asked about closing Guantanamo, McCain said that "there are people that have been deemed unsuitable for ever being released, and those people we could move to a maximum security prison in the United States."

(Read More: Guantanamo's New Purgatory)

As part of the Senate Armed Services Committee version of the NDAA, which wasn't taken up by the full Senate, Graham sponsored an amendment that would potentially allow the president to close Guantanamo and bring detainees into the United States. Before doing so, Obama would have to give a plan for closing the prison to lawmakers, which they would be allowed to reject by passing a joint resolution. Obama, in turn, could veto the resolution.

But many of their Republican colleagues remain adamantly opposed to closing Guantanamo Bay and bringing detainees into the United States. Sen. Pat Roberts threatened earlier this year to "shut down the Senate" if the administration unilaterally tried to move detainees into the country.

And Sen. James Inhofe, the Armed Services Committee ranking member, warned against bringing them into the country as well.

"The problem we have with this, if you intermingle some of the people there with the prison population, these are not--these people down there are not criminals. They're people who teach terrorism," the Oklahoma Republican said during a floor speech last week.

At least for the 2015 fiscal year, Inhofe's side has won the debate. Graham's proposal was removed from the final version of the NDAA and replaced with language banning the president from bringing detainees into the United States.

But despite legislative roadblocks, the administration has made progress in recent months reducing the facility's population, including a recent transfer of six detainees to Uruguay. It's the first time a South American country has accepted detainees.

"While still small, that's significant in terms of what we haven't seen in the last couple of years," Milazzo said. "… To me, that says that the administration is going to increase their efforts and really try to transfer as many of the cleared detainees out of Guantanamo as possible."

And when it comes to bringing detainees into the United States, she predicted that eventually something has to give: "I think there's always a concern that Guantanamo will continue to be used as a political football. …[But] the question then becomes do members of Congress want to continue to have to take these votes."