Umar Farouk Abdulmutallab pled guilty Wednesday in Christmas Day airline bombing plot. (HO/AFP/GETTY IMAGES)

DETROIT — The man whose failed plot contributed to the deployment of full-body scanners at U.S. airports pleaded guilty Wednesday to trying to bring down a jetliner with a bomb in his underwear.

Umar Farouk Abdulmutallab of Nigeria told a federal judge that he acted in retaliation for the killing of Muslims worldwide. He referred to the bomb in his underwear as a “blessed weapon.”

Abdulmutallab, who never denied the federal charges and acknowledged working for al-Qaeda, entered the plea against his attorney’s advice on the second day of his trial. He faces a mandatory life sentence for the 2009 attack that aimed to kill nearly 300 people on Christmas Day in the skies above Detroit.

Abdulmutallab read a political statement saying that if the United States continues “to persist and promote the blasphemy of Muhammad and the prophets,” it risks “a great calamity. . . . If you laugh at us now, we will laugh at you later on the day of judgment.”

Abdulmutallab suggested more than a year ago that he wanted to plead guilty but never did. He dropped his four-person, publicly financed defense team in favor of representing himself with help from a prominent local lawyer appointed by the court, Anthony Chambers.

Prosecutors were aware of a possible plea, but there were no negotiations. Abdulmutallab had “no interest” in speaking to prosecutors, Chambers said.

Chambers wanted to go to trial to raise doubts about how powerful the explosive was. And if Abdulmutallab were convicted, there was also a possible appeal involving the lack of a Miranda warning before an FBI interview.

“I know he prayed about it and came to what he believed was the right decision,” Chambers said. “I don’t think there was anything done [at trial] that made him say, ‘This is a done deal. I have to take a plea.’ It was a personal decision.”

Passenger Lori Haskell of Newport, Mich., watched the plea by video from a room near the court. She called Abdulmutallab’s statement “chilling” but not surprising.

“I’m just really relieved that it’s done with,” she said.

The Amsterdam-to-Detroit flight was moments from landing when Abdulmutallab tried to detonate the bomb in his pants. The main device failed to go off, but his clothes caught fire, and passengers jumped on him when they saw smoke and flames.

The government said Abdulmutallab willingly explained the plot twice, first to U.S. border officers and then in more detail to FBI agents who interviewed him at a hospital after he was treated for burns to his groin.

There were also photos of his scorched shorts, video of Abdulmutallab explaining his suicide mission before departing for the United States and scores of eyewitnesses.

Dimitrios Bessis of Harrison County, Ga., sat two rows behind Abdulmutallab on Northwest Airlines Flight 253 and used his hat to beat out the flames. He said his trip to Detroit to serve as a potential witness was his first plane ride since the attempted attack.

“He put terror in children’s eyes, in mother’s hearts,” Bessis said. “I’ve seen men freeze from shock on the plane. It was a horrible experience. I have nightmares from it.”

Abdulmutallab, the well-educated son of a wealthy banker, told investigators he trained in Yemen, which is home base for al-Qaeda in the Arabian Peninsula. He said he targeted a U.S.-bound flight at the urging of Anwar al-Awlaki, a radical U.S.-born Muslim cleric recently killed by the U.S. military in Yemen.

In court, he sometimes appeared agitated, saying that Osama bin Laden and al-Awlaki were alive.

Abdulmutallab, who told the judge he is 25, pleaded guilty to all eight charges, including conspiracy to commit terrorism and attempted use of a weapon of mass destruction. He is scheduled to be sentenced Jan. 12.

When Assistant U.S. Attorney Jonathan Tukel asked whether he was carrying a bomb that day, Abdulmutallab replied: “If you say so.” He said he was “guilty of U.S. law but not in the Koran.”

Before the attempted bombing, the Transportation Security Administration was using full-body scanners in some U.S. cities, but the attack accelerated their placement. There are now nearly 500 devices nationwide.

Passenger Alain Ghonda of Silver Spring said he went to court Wednesday “to see the man who tried to kill me.” He took some comfort in knowing Abdulmutallab would be locked up for many years.

“At least he will be going away for hopefully forever and not be able to harm other people,” he said.

Associated Press writers David Runk and Jeff Karoub in Detroit and Matt Apuzzo in Washington contributed to this report.