Secretary of State John Kerry lamented Wednesday that a terrorist who the Obama administration released from the military prison at Guantanamo Bay subsequently returned to fight for al Qaeda, telling lawmakers "he’s not supposed to be doing that."

Appearing before the State, Foreign Operations, and Related Programs Subcommittee of the Senate Appropriations Committee, Kerry made the statement while testifying about the State Department’s budget request for the fiscal year 2017.

During the hearing, Sen. Mark Kirk (R., Ill.) asked Kerry for his thoughts on Ibrahim al Qosi, the former Guantanamo detainee who is now a prominent al Qaeda leader, and had staffers hold up a picture of the terrorist for Kerry to see.

"Let me just ask one question," Kirk said to Kerry. "I want to show you a picture of Ibrahim al Qosi, who was recently released by the administration to the Sudanese, and he appeared on some al Qaeda videos recruiting people for AQAP [al Qaeda in the Arabian Peninsula]."

Kirk went on to say, "Now that he’s out, I would hope we would end the policy of issuing terrorists to terrorist nations, and where they can get out."

Sudan, where al Qosi was released, has a long history of terrorist activity with Sunni jihadist groups and individuals like al Qaeda and Osama bin Laden as well as with the Islamic Republic of Iran. The Sudanese government has also been internationally accused of committing genocide in Darfur.

Kerry paused for a moment before saying to Kirk, "Well, Senator, he’s not supposed to be doing that. And there are consequences for that, and there will be. But apart from that, the fact is that we’ve got people who’ve been held without charges for 13 years, 14 years in some cases. That’s not American, that’s not how we operate."

Al Qosi was an aide to Osama bin Laden when he was taken to Guantanamo in 2002. He was released 10 years later after pleading guilty to war crimes in 2010 and was sent to his native Sudan. Upon the terrorist’s release, his lawyer, Paul Reichler, said al Qosi was looking forward to a quiet life of freedom, but the two never had contact after al Qosi left Guantanamo.

Al Qosi remerged this month as a prominent figure in AQAP propaganda videos calling for the takeover of Saudi Arabia and an end to the U.S.-Saudi alliance.

This recent development came shortly before President Obama announced his plan on Tuesday to close Guantanamo by releasing many of the remaining 91 detainees to foreign countries and transferring the rest to a prison on U.S. soil.

While it is currently illegal to move any of the detainees to the United States, Obama is hoping Congress will change the law so he can implement the policy, although majorities in both houses of Congress oppose the move.

Kerry echoed the president’s argument that Guantanamo remaining open is not in keeping with American values and serves as a recruiting tool for terrorists.

Critics say the detention facility is necessary to house enemy combatants who are members of jihadist groups like al Qaeda and gather intelligence from them. They add that prisoners at Guantanamo receive exceptional care, which the former head of Southern Command told reports last month.

Opponents of the president also point to the fact that the recidivism rate for released detainees who return to the battlefield is 30 percent, citing al Qosi as just one example of many.