Faisal Shahzad, 30, in an undated photo released in May. ((U.S. Marshals Service/Associated Press))

Calling himself a "Muslim soldier," a defiant Pakistan-born U.S. citizen pleaded guilty Monday to carrying out the failed Times Square car bombing, saying his attack was the answer to "the U.S. terrorizing … Muslim people."

Wearing a white skullcap, Faisal Shahzad entered the plea in U.S. District Court in Manhattan just days after a federal grand jury indicted him on 10 terrorism and weapons counts, some of which carried mandatory life prison sentences. He pleaded guilty to them all.

"One has to understand where I'm coming from," Shahzad calmly told U.S. District Judge Miriam Goldman Cedarbaum, who challenged him repeatedly with questions such as whether he worried about killing children in Times Square. "I consider myself … a Muslim soldier."

The 30-year-old described his effort to set off a bomb in an SUV he parked in Times Square on May 1, saying he chose the warm Saturday night because it would be crowded with people he could injure or kill.

He revealed that he actually packed his vehicle with three separate bombs, hoping to set off a fertilizer-fuelled bomb packed in a gun cabinet, a set of propane tanks and gas canisters rigged with fireworks to explode in a fireball.

Shahzad said he expected the bombs to begin going off after he lit a fuse and waited between 2½ minutes and five minutes for them to explode.

"I was waiting to hear a sound but I didn't hear a sound. So I walked to Grand Central [station] and went home," he said.

Shahzad dismissed the judge's question about the children by saying the U.S. doesn't care when children are killed in Muslim countries.

"It's a war. I am part of the answer to the U.S. terrorizing the Muslim nations and the Muslim people," he said. "On behalf of that, I'm revenging the attack. Living in the United States, Americans only care about their people but they don't care about the people elsewhere in the world when they die."

Shahzad made the plea and an accompanying statement as Cedarbaum began asking him a lengthy series of questions to ensure he understood his rights.

Cedarbaum asked Shahzad if he understood some charges carried mandatory life sentences and that he might spend the rest of his life in prison. He said he did.

At one point, she asked if he was sure he wanted to plead guilty.

He said he wanted "to plead guilty and 100 times more" to let the U.S. know that if it does not get out of Iraq and Afghanistan, halt drone attacks and stop meddling in Muslim lands, "we will be attacking U.S."

Sentencing was scheduled for Oct. 5.

Shahzad was arrested on May 3, two days after he parked and then abandoned the bomb-laden SUV near a Broadway theatre.

Shahzad was picked up by FBI agents and New York City police detectives at JFK International Airport in New York aboard a flight headed to Dubai in the United Arab Emirates.

Prosecutors said the 30-year-old former budget analyst from Bridgeport, Conn., used money and training from the Pakistani Taliban to formulate the plot.

U.S. Attorney General Eric Holder called the bombing attempt a "terrorist plot." Officials later said Shahzad told them he had trained at a terrorist camp in Pakistan's tribal region of Waziristan.

The Pakistani Taliban, active in that area, tried to claim responsibility for the attempted bombing, but U.S. officials have discounted that claim.

Shahzad's cousin, Kifyat Ali, called his arrest "a conspiracy," but authorities say Shahzad co-operated with investigators for two weeks before requesting a lawyer.