New York (CNN) -- A judge in Manhattan sentenced Faisal Shahzad to life in prison Tuesday for the botched Times Square car bombing, as the 31-year-old Pakistani-American defiantly warned in court to "brace yourself, the war with Muslims has just begun."

"The defeat of the U.S. is imminent, inshallah," Shahzad said during the sentencing. Inshallah means "if God is willing."

Speaking in a 14th-floor courtroom with a view of Lower Manhattan and the area where the World Trade Center towers once stood, Shahzad said Muslims have been defending their people and their lands. If that makes them terrorists, "then we will terrorize you," he said, imploring people to embrace Islam.

U.S. District Judge Miriam Cedarbaum, who sentenced Shahzad to the mandatory sentence of life in prison, noted that he failed to show remorse for his actions.

She also said that the sentence was an "adequate deterrent to those inclined to follow the defendant and to protect the public against the crimes of this defendant."

White House spokesman Nick Shapiro noted the trial held in a civilian court effectively handled the case. Republicans have criticized the Obama administration for seeking to prosecute terrorists in civilian courts instead of military panels.

"We are pleased that this terrorist has been sentenced to spend the rest of his life in prison, after providing substantial intelligence to our interrogators, and a speedy civilian trial," Shapiro said. "His trial served no propaganda purpose for al Qaeda, and only underscored the strength of our justice system. The case shows once again how our values and the rule of law can keep us safe against those determined to do us harm on behalf of terrorist organizations overseas."

During Tuesday's sentencing, Cedarbaum asked Shahzad about swearing to defend Americans when he became a naturalized citizen.

"I swore but I didn't mean it," he said.

Shahzad interrupted the judge's sentencing several times. He pointed to the ceiling and said "Allahu akbar," or God is great, and he said he didn't care about the sentence.

"My sentence reflects life in this world, not life in the hereafter," he said. "I'm happy with the deal that God has given me."

Saying he appears to be someone "who is capable of education," she said she hopes he will spend time in prison thinking of whether the Quran wants you to kill people." The Quran is Islam's sacred book.

"The Quran gives us the right to defend ourselves," he said.

Cedarbaum said he has the right to appeal the sentence. Shahzad put his hands behind his back, and U.S. marshals cuffed him and led him out of court.

The sentence drew immediate reaction in addition to the White House comment.

Preet Bharara, U.S. attorney for the Southern District of New York, issued a statement saying the sentence was appropriate, calling Shahzad a "remorseless terrorist who betrayed his adopted country."

Janice Fedarcyk, assistant director in charge of the FBI's New York office, said the sentence "means Shahzad will never pose that threat again."

New York Police Commissioner Raymond W. Kelly said, "it's only right that Shahzad forfeit his freedom for life for having tried to forfeit the lives of New Yorkers forever."

U.S. Sen. Charles E. Schumer, D-New York, said the sentence sends a clear message.

"Let this be a warning to others who would attempt to attack us: You will be caught; you will be held to account; and justice will be brought down upon you," Schumer said.

Shahzad pleaded guilty in June to all 10 counts in an indictment against him. At the time, he told the court, "I want to plead guilty 100 times because unless the United States pulls out of Afghanistan and Iraq, until they stop drone strikes in Somalia, Pakistan and Yemen and stop attacking Muslim lands, we will attack the United States and be out to get them."

Charges against Shahzad included attempting to use a weapon of mass destruction, conspiracy and attempt to commit international terrorism, among others, authorities have said.

Shahzad is accused of attempting to set off a vehicle bomb in Times Square on May 1, according to documents filed in federal court.

Prosecutors said Shahzad carefully selected his location as a highly populated target and intended to strike again if he wasn't caught the first time.

The bomb failed to detonate and he was arrested two days later while trying to leave the country on a flight bound for Pakistan from New York's John F. Kennedy International Airport.

In a sentencing memo submitted to a federal court Wednesday, prosecutors painted a picture of a young man determined to target Americans on a large scale.

According to the memo, Shahzad used webcams accessible on the internet "as part of his effort to maximize the deadly effect of his bomb."

The memo says Shahzad found webcams online and studied the real-time video feeds of different areas in Times Square to determine when and where he could inflict the most damage.

Prosecutors said Shahzad "wanted to select the busiest time for pedestrian traffic in Times Square because pedestrians walking on the streets would be easier to kill and to injure than people driving in cars."

Federal prosecutors also contended in the sentencing memo that Shahzad believed the bomb would kill about 40 people and that he "was prepared to conduct additional attacks until he was captured or killed."

According to the document, at the time of his arrest, Shahzad waived his Miranda rights and stated that "if he had not been arrested he planned to detonate a second bomb in New York City two weeks later."

At a June court appearance, Shahzad admitted to receiving five days of weapons training in Waziristan, in Pakistan.

Prosecutors said Shahzad spent 40 days beginning in December 2009 in the tribal region that straddles Pakistan and Afghanistan, where he lived with members of the Pakistani Taliban, or TTP.

According to the court documents, he worked with an experienced bomb trainer affiliated with the TTP for five days. In addition, Shahzad was given $5,000 to help fund the mission and agreed to appear in a TTP video glorifying the planned attack.

The roughly 40-minute video, according to its description in the memo, features Shahzad quoting from the Quran while the other side of the screen is filled with images of Times Square after the botched bombing.

Toward the end of the video, the memo quotes Shahzad as saying, "I have been trying to join my brothers in jihad every day since 9/11 happened. I am planning to wage an attack inside America."