NEW YORK -- Calling himself a Muslim soldier, a defiant Pakistan-born U.S. citizen pleaded guilty Monday to carrying out the failed Times Square car bombing and left a sinister warning that unless the U.S. leaves Muslim lands alone, "we will be attacking U.S."

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.

U.S. District Judge Miriam Goldman Cedarbaum challenged Shahzad repeatedly with questions such as whether he had worried about killing children in Times Square.

"One has to understand where I'm coming from," Shahzad calmly replied. "I consider myself ... a Muslim soldier."

The 30-year-old described his effort to set off a bomb in a sport utility vehicle 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 said he conspired with the Pakistan Taliban, which provided more than $15,000 to fund his operation.

He explained that he packed his vehicle with three separate bomb components, hoping to set off a fertilizer-fueled bomb packed in a gun cabinet, a set of propane tanks and gas canisters rigged with fireworks to explode into a fireball. He also revealed he was carrying a folding assault rifle for "self-defense."

Shahzad said he lit a fuse and waited 2 1/2 to five minutes for the bomb to erupt.

Shahzad dismissed the judge's question about the children by saying the U.S. didn't care when children were 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."

Cedarbaum also asked Shahzad if he understood that the people in Times Square might not have anything to do with what happened overseas.

"The people select the government. We consider them all the same," Shahzad said.

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

She asked him 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 him 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 did 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.