The Nigerian student who attempted to blow up a plane over Detroit with a bomb sewn into his underwear pleaded guilty at a trial Wednesday. 

Umar Farouk Abdulmutallab, who said after the botched Christmas Day attack that he was affiliated with the al Qaeda terrorist network, faces between 30 years and life in prison.

Abdulmutallab pleaded guilty to eight felony counts surrounding the botched attack. He then read from a statement that said that while he was guilty under American rules, he was not guilty under Islamic law for the attempted crime, according to the Detroit Free Press.

The would-be terrorist then said he attempted the attack in retaliation for the murder of innocent civilians in Middle Eastern war zones by the United States, and said committing jihad was one of "the most virtuous acts" a Muslim can perform. Abdulmutallab had said previously that he was inspired by Anwar al-Awlaki, the American-born al Qaeda leader killed earlier this month in a drone strike.

"If you laugh at us now, we will laugh at you later," Abdulmutallab said, warning that "a calamity" would befall the United States.

Abdulmutallab will be sentenced in January.

The so-called "underwear bomber's" trial in federal court has been a controversial tactic on Capitol Hill, where Republicans have argued that the Obama administration should have tried the proceedings in military, rather than civilian, court. Sen. Jeff SessionsJefferson (Jeff) Beauregard SessionsFeinstein, Harris call for probe of ICE after employee resigns House Judiciary chair subpoenas DOJ for FBI documents Sen. Gardner won’t let Jeff Sessions tread on Colorado’s cannabis boom MORE (R-Ala.) said that doing so squandered an opportunity to gather intelligence about al Qaeda.

"Abdulmutallab is a war criminal, not a civilian," he said to the Los Angeles Times. "It is wrong to provide him with the rights and privileges afforded in a civilian trial."

Rep. Candice Miller (R-Mich.), who serves on the House's Homeland Security committee, echoed the criticism, arguing that Abdulmutallab should not have been afforded Miranda rights.

"By affording this foreign terrorist who attempted to kill our fellow Americans the rights guaranteed by our Constitution, including the right to remain silent, after less than one hour of questioning it is impossible to determine how much vital intelligence was lost," Miller said in a statement.

“I call on this Administration to learn from this mistake and take a different approach in the future.  Going forward we must treat these terrorists as what they are, enemies of our nation who should rightly be tried in military courts under the enemy combatant process."

But Attorney General Eric HolderEric Himpton HolderJudge orders Walker to hold special elections Holder: 2018 vote crucial to combating gerrymandering Holder: Sessions needs to 'have the guts' to say no to Trump MORE defended the decision in a statement Wednesday.

"Contrary to what some have claimed, today’s plea removes any doubt that our courts are one of the most effective tools we have to fight terrorism and keep the American people safe," Holder said. "Our priority in this case was to ensure that we arrested a man who tried to do us harm, that we collected actionable intelligence from him and that we prosecuted him in a way that was consistent with the rule of law.  We will continue to be aggressive in our fight against terrorism and those who target us, and we will let results, not rhetoric, guide our actions.”

This post was updated at 1:15 p.m.