Mrs Rivera had wanted to remain in Canada on humanitarian grounds
Canada has ordered the deportation of the first woman US soldier to have sought asylum in the country to avoid being deployed to Iraq.
Kimberly Rivera, a mother of three, had requested permission to remain in Canada on humanitarian grounds but her appeal was rejected.
She could face up to five years in prison when she returns to the US.
Some 200 deserters from the US military are believed to have fled to Canada, some living incognito.
Mrs Rivera served in Iraq in 2006 but deserted a year later after refusing to be redeployed.
She said her experience in Iraq was "a huge awakening" which convinced her that the war was "immoral" and that she could not participate in it. She is being backed by the War Resisters Support Campaign.
Mrs Rivera and her family have been told they must leave Canada by the end of January unless the court order is reversed.
Last year, the Canadian parliament passed a non-binding motion granting asylum to deserters from the Iraq war.
But correspondents say the governing Conservatives opposed the motion, not willing to risk upsetting Washington over the issue.
So far Canada has deported only one US deserter, Robin Long. He was sentenced to 15 months in prison on his return.
Kimberly Rivera took an oath to "obey the orders of the President of the United States and the orders of the officers appointed over her." If she has moral qualms about serving she should not have joined.
1LT Michael Butler, Chicago, USA
If all soldiers refused to fight in illegal and immoral wars waged on lies, there would be no more such wars. She should be allowed to stay.
Mark Wensley, Canada
Look - she joined the US armed Forces. She knew what it was all about. Why should we allow her to live here? The US is our ally, why should we shelter people who break US Law? The US is an open society, with the rule of law. There is no reason for people from the US to seek "asylum" here. US courts are fair, and will apply US law. Send her back.
Robert Orr, Toronto, Canada
Speaking as a Canadian citizen, wholly opposed to the United States occupation in Iraq, I am ashamed that we would deny sanctuary to those in the American military who are equally opposed. The government of this nation shouldn't care about "upsetting" Washington on issues of human rights. Historically, we're a nation of peace and peace-keeping. That we should discard that legacy to please the government of the USA disgusts me.
Joshua Peters, Vancouver, Canada
I don't think my country should except Iraq war deserters. They are not facing torture and life imprisonment in the USA. They will get a year in prison and possibly less in this woman's case.
I agree with the ruling of Canadian government to deport all US deserters. They signed a contract to serve in the military on a voluntary basis. This is not Vietnam where all enlisted military were drafted. The deserters want all the benefits but not to serve their country during the war. They should not have enlisted if they were against the war.
Ian, Vancouver, Canada
The fact that she already served and then decided for herself to desert after seeing what was happening there is interesting. It's really shameful that we can put someone into jail for refusing to go to a war, especially a war of aggression such as this one.
Chris, Shenzhen, China