Oct. 5, 2010  -- Faisal Shahzad, who attempted to detonate a car bomb in New York's Times Square on a crowded Saturday night, was sentenced to life in federal prison without parole today.

Before she pronounced sentence, Judge Miriam Cedarbaum said, "Mr. Shahzad, I think you should get up."

Shahzad, wearing a white prayer cap, said "Allahu Akbar" after hearing the sentence, and said he would "sacrifice a thousand lives for Allah."

"War with Muslims has just begun," said Shahzad, who then predicted that "the defeat of the US is imminent, god willing."

Shahzad also said he was happy with "the deal" God had given him. "We have laws made by Allah. We don't need laws made by humans."

"I do hope you spend time in prison thinking about whether the Koran gives you the right to kill innocent people," said Judge Cedarbaum.

CLICK HERE to follow the ABC News Investigative Team's coverage on Twitter.

She also reminded Shahzad that he'd sworn an oath of allegiance to the US when he became a citizen.

"I did swear but I did not mean it," said Shahzad.

"It's only right that Shahzad forfeit his freedom for life for having tried to forfeit the lives of New Yorkers forever," said New York police commissioner Ray Kelly.

"Faisal Shahzad is a remorseless terrorist who betrayed his adopted country and today was rightly sentenced to spend the rest of his life in federal prison," said US Attorney Preet Bharara.

Shahzad Guilty Plea To Ten Charges

Shahzad pleaded guilty in June to the failed May 1 attack, and admitted receiving terror training from the Pakistani Taliban. Two of the ten different terror and weapons charges to which he pleaded carry mandatory life sentences.

The 31-year-old naturalized American, who was born in Pakistan and lived in Connecticut, warned in June that further terror attacks were coming.

After Shahzad had pleaded guilty to the first charge, attempted use of a weapon of mass destruction, Judge Cedarbaum said, "I gather you want to plead guilty to all [the charges.]

"Yes," said Shahzad, and then said he wanted to plead guilty and 100 times more," because he wanted the U.S. to know it will continue to suffer attacks if it does not leave Iraq and Afghanistan and stop drone strikes in Pakistan.

Calm, but clearly angry, and standing the whole time, Shahzad spent nearly an hour giving the judge a narrative of his failed bombing attempt, and how he changed from a financial analyst with an MBA to a would-be bomber and what he called "part of the answer" to the U.S. killing of Muslims. He also confirmed that he had placed the bomb in Times Square at its busiest in order to do the maximum damage.

Shahzad admitted driving a Nissan Pathfinder into midtown Manhattan on Saturday evening, May 1, when the city's theater district was packed with tourists. He abandoned the SUV, which was stuffed with fireworks, propane, gasoline and fertilizer, after trying to use the fireworks to ignite the vehicle.

Shahzad's exchange with Judge Cedarbaum began with Shahzad reading a prepared statement. Cedarbaum then asked Shahzad not to read, but to speak instead.

CLICK HERE to follow ABC News Chief Investigative Correspondent Brian Ross on Twitter.

Shahzad told Cedarbaum it took him six months to connect with the Taliban in Pakistan. He said he then spent 40 days with the Taliban in Waziristan, only five of which were devoted to bomb training.

Shahzad Considers Himself a "Muslim Soldier"

After his training, he spent February to April in the U.S. getting the money and materials together for a bombing and planning his attack.

"I made the bomb in a car and drove it to Times Square," he told Cedarbaum.

"All by yourself?" she asked.

"All by myself," he confirmed.

Shahzad said he didn't know why the device had failed to work, and that after lighting the fuse and waiting three-and-a-half to five minutes to hear the sound of an explosion that never came, he went to Grand Central train station and took a train back to Bridgeport, Connecticut.

He also said he had chosen no specific building, but had intentionally placed the bomb in Times Square during a busy time.

"You wanted to injure a lot of people," said Cedarbaum.

Shahzad said the judge needed to understand his role. "I consider myself a Muslim soldier," he said. When Cedarbaum asked whether he considered the people in Times Square to be innocent, he said they had elected the U.S. government.

"Even children?" said Cedarbaum.

"When the drones [in Pakistan] hit, they don't see children," answered Shahzad. He then said, "I am part of the answer to the U.S. killing the Muslim people."

Shahzad was arrested on May 3, two days after the failed bombing, at New York's JFK airport as he was about to depart on a Dubai-bound flight.

Shahzad's 13-page indictment included details about his travels to Pakistan, and named the Pakistani terror group, Tehrik-e-Taliban, from which he received bomb training. The indictment also said that Shahzad received money from an unnamed coconspirator in Pakistan prior to the failed May 1 car bombing in midtown Manhattan.

"The facts alleged in this indictment show that the Pakistani Taliban facilitated Faisal Shahzad's attempted attack on American soil," said Attorney General Eric Holder. "Our nation averted serious loss of life in this attempted bombing, but it is a reminder that we face an evolving threat that we must continue to fight with every tool available to the government."

Click Here for the Blotter Homepage.