Image caption Canada first ordered Rivera deported in 2009, but she appealed against that decision

A US woman soldier has been sentenced to 10 months in military prison after pleading guilty to desertion while on leave from a deployment in Iraq.

Pte First Class Kimberly Rivera had been serving as a base guard in Baghdad when she fled to Canada in 2007 with her husband and children.

The 30-year-old said she had become disillusioned with the war.

Canadian authorities denied her request for refugee status and in 2009 threatened her with deportation.

Pte Rivera presented herself at the US border in September 2012 and was arrested and returned to her unit's base in Colorado.

She pleaded guilty in a military court in Fort Carson on Monday. In addition to 10 months imprisonment, she will receive a bad conduct discharge.

During the Vietnam War, more than 50,000 Americans fled to Canada to avoid conscription and were welcomed by Canadian authorities. Most returned to the US following President Jimmy Carter's offer of amnesty to the so-called "draft dodgers".

Canadian activist group War Resisters Support Campaign says about 200 US soldiers fled to Canada during the Iraq War.

But Canada's Conservative government has argued the situation has changed since the Vietnam era because the US military is now an all-volunteer force.