PROVIDENCE, R.I. — A Sudanese man who in 2011 pleaded guilty before a military commission at Guantánamo Bay, Cuba, to charges of conspiracy and providing military support to terrorism has finished the portion of his sentence he was required to serve and will be sent home soon, the Pentagon announced Tuesday.

The transfer of the prisoner, Noor Uthman Mohammed, had been in doubt because Congress last year tightened a law barring the transfer of any detainee to a nation that has been designated a state sponsor of terror, like Sudan. The change removed an exception for transfers of prisoners who had reached plea agreements with military commission prosecutors.

The prospect that Mr. Noor — as he prefers to be called — would not be released had threatened to undermine the ability of military prosecutors to persuade detainees to plead guilty and serve as potential witnesses in more important cases. Mr. Noor pleaded guilty in early 2011 as part of a deal to serve an additional 34 months at Guantánamo on top of the more than eight years he had already been there.

But the Obama administration decided it was free to repatriate Mr. Noor because Congress later resurrected the older version of the transfer restrictions — which contained the plea agreement exception — when it passed continuing resolutions to keep financing the military in line with earlier budget bills.