Vincent Elkaim / AP via The Canadian Press Iraq war resister Kimberly Rivera speaks at a press conference in Toronto in August. Rivera, who is pregnant with her fifth child, returned to to the U.S. in September and on Tuesday was sentenced to 10 months in prison for desertion.

DENVER -- An Army private believed to be the first female U.S. soldier to seek refuge in Canada rather than return to duty in Iraq was sentenced to 10 months in prison after pleading guilty to desertion, military officials in Colorado said on Tuesday.

Kimberly Rivera, who said she grew opposed to the war during a three-month tour of duty in Iraq, pleaded guilty at a court-martial proceeding in Fort Carson, Colo., on Monday and was sentenced immediately.

In addition to the prison time, the 30-year-old private was reduced in rank, ordered to forfeit pay and benefits and given a bad-conduct discharge, base spokeswoman Meghan Williams said.

Rivera fled to Toronto in 2007 while on leave after serving in Iraq with Fort Carson's 4th Brigade Combat Team, 4th Infantry Division, in Baghdad, according to her lawyer, James Branum.

She surrendered to authorities at the U.S. border in upstate New York last September after a Canadian court ordered her deported to the United States, capping several years spent by Rivera unsuccessfully seeking asylum in Canada.

Branum said Rivera was the first and, as far as he knows, the only female U.S. military deserter to flee to Canada during the Iraq war. The advocacy group War Resisters Support Campaign has said Rivera was the first U.S. female soldier to seek asylum in Canada to avoid redeployment to Iraq.

Rivera, who had been living in Toronto with her partner and four children, deserted because she developed an opposition to the U.S. military mission in Iraq based on her experience there, the group said.

Her case had drawn attention of such international human rights advocates as retired Anglican Archbishop Desmond Tutu, who urged Canadian authorities to allow Rivera to stay.

Under a deal struck with military prosecutors, Rivera agreed to plead guilty in exchange for having her prison term limited to 10 months. Rivera faced a maximum five-year sentence and a dishonorable discharge had she been convicted at trial, military authorities said.

Rivera approached a U.S. military chaplain in Iraq to express her moral reservations about continuing to serve in the conflict but was not informed of her right to seek conscientious objector status, a move that might have headed off prosecution for desertion, her lawyer said.

Rivera will remain at a county jail in Colorado for seven to 10 days before she will be transferred to a military prison, mostly likely the brig at the Marine Corps Air Station Miramar in California, Branum said.

Rivera is pregnant with her fifth child, and Branum said he will appeal to an Army judge for clemency on "humanitarian grounds."

Related:

10 years after Iraq invasion, troops ask: 'Was it worth it?'

Did invasion bring 'hope and progress' as Bush vowed?

Full Iraq coverage from NBC News