A U.S. Army veteran accused of fighting alongside a Syrian rebel group linked to al-Qaeda and charged with conspiracies that could have landed him in prison for life pleaded guilty Thursday to a less onerous count and was given a sentence of “time served,” court records show.

Eric Harroun, of Phoenix, was arrested in March and later indicted for conspiracy to provide support to foreign terrorists and conspiracy to use destructive devices overseas. According to an FBI affidavit, investigators found Internet postings describing or showing him carrying military weapons and fighting against Syria’s military, and Harroun later admitted that he worked alongside a group called Jabhat al-Nusra after traveling to Syria to join up with the Free Syrian Army.

The Free Syrian Army is backed by the United States and other Western countries. Jabhat al-Nusra, also known as the al-Nusra Front, has been designated a terrorist organization by the State Department but is thought to be effective in combating Syrian President Bashar al-Assad.

Harroun, 31, told investigators he knew the al-Nusra Front was a designated terrorist organization, court papers say.

Harroun pleaded guilty to conspiring to violate arms control laws and prosecutors dropped the most serious charges, court records show.

It remains unclear what prompted the deal and whether the rapidly shifting political climate in Syria had an effect on the case. The plea agreement and statement of facts are both sealed.

A spokesman for the U.S. Attorney’s office in the Eastern District of Virginia, where the case is filed, declined to comment. Harroun’s defense attorney also declined to comment.