WACO, Texas -- A U.S. soldier convicted of collecting bomb-making materials for what he told authorities would be a "massive attack" on a Texas restaurant full of troops was sentenced Friday to life in prison.

Army Pfc. Naser Jason Abdo, a Muslim, had been planning a religious mission to win "justice" for the people of Iraq and Afghanistan, according to a recorded jail conservation with his mother played for jurors at trial.

His plan, according to what he told authorities, was to place a bomb in a busy restaurant filled with soldiers, wait outside and shoot anyone who survived. In a recorded police interview, Abdo said he wanted to carry out the attack "because I don't appreciate what my unit did in Afghanistan."

Outside court, prosecutor Mark Frazier said Abdo had come close to carrying out the attack. U.S. Attorney Robert Pitman compared the plot to recent mass shootings at a movie theatre in Colorado and a Sikh temple in Wisconsin.

"In the wake of the tragic events in Colorado and Wisconsin, this is yet another reminder that there are those among us who would use or plan to use violence to advance their twisted agenda," Pitman said.

Abdo, who was sentenced to two life terms plus additional time, sat in court Friday with a white cloth bound over his mouth and a black mesh covering his hair and face. He previously was accused of spitting what he thought was HIV-infected blood on agents escorting him.

Abdo represented himself at the sentencing after the 22-year-old last month said he and his attorneys weren't communicating effectively.

Abdo said he would continue his fight "until the day the dead are called to account for their deeds."

He spoke in Arabic several times and translated it for the court.

"I do not ask the court to give me mercy, for Allah is the one that gives me mercy," he said in a low, gravelly voice through the cloth mask.

A federal jury convicted Abdo in May on six charges, including attempting to use a weapon of mass destruction. He had been absent without leave from Fort Campbell, Kentucky, when arrested with bomb-making materials last summer at a Fort Hood-area motel.

He also was found guilty of attempted murder of U.S. officers or employees and four counts of possessing a weapon in furtherance of a federal crime of violence.

Abdo at age 17 decided to follow Islam. He enlisted in the military in 2009, thinking that the service wouldn't conflict with his religious beliefs. But according to an essay that was part of his conscientious objector status application filed in June 2010, Abdo reconsidered as he explored Islam further.

Abdo said in his discharge request that other soldiers harassed him about his religion during basic and advanced training. As he neared deployment, the private first class applied for conscientious objector status, writing in a letter that accompanied his application that he wasn't sure "whether going to war was the right thing to do Islamically."

Abdo's unit was deployed to Afghanistan without him. He said he would refuse to go even if it resulted in a military charge against him.

His conscientious objector status was put on hold after he was charged with possessing child pornography in May 2011. Two months later, Abdo went AWOL from the Kentucky post.

In the essay included in the conscientious objector status application, Abdo described a 2009 Fort Hood shooting rampage by an Army psychiatrist that left 13 dead and dozens wounded as "an act of aggression by a man and not by Islam."

Maj. Nidal Hasan faces the death penalty in those shootings if convicted. His court-martial is set for later this month.

Abdo told the court he lived in Hasan's shadow despite "efforts to outdo him."