Swept up by a wave of patriotism after the US invasion of Iraq, Chris Magaoay joined the Marine Corps in November 2004.

The newly married Magaoay thought a military career would allow him to continue his college education, help his country and set his life on the right path.

Less than two years later, Magaoay became one of thousands of military deserters who have chosen a lifetime of exile or possible court-martial rather than fight in Iraq or Afghanistan.

"It wasn’t something I did on the spur of the moment," said Magaoay, a native of Maui, Hawaii. "It took me a long time to realize what was going on. The war is illegal."

Magaoay said his disillusionment with the military began in boot camp in Twentynine Palms, Calif., where a superior officer joked about killing and mistreating Iraqis. When his unit was deployed to Iraq in March, Magaoay and his wife drove to Canada, joining a small group of deserters who are trying to win permission from the Canadian government to stay.

"We’re like a tight-knit family," Magaoay said.

The Pentagon says deserters like Magaoay represent a tiny fraction of the nation’s fighting forces.

"The vast majority of soldiers who desert do so for personal, family or financial problems, not for political or conscientious objector purposes," said Lt. Col. Bryan Hilferty, a spokesman for the Army.

Since 2000, about 40,000 troops from all branches of the military have deserted, the Pentagon says. More than half served in the Army. But the Army says numbers have decreased each year since the United States began its war on terror in Afghanistan.