The Marine Corps has discharged a sergeant who posted on Facebook, "Screw Obama and I will not follow all orders from him."

Update at 4:26 p.m. ET: "I love the Marine Corps, I love my job. I wish it wouldn't have gone this way," Sgt. Gary Stein told the Associated Press. "I'm having a hard time seeing how 15 words on Facebook could have ruined my nine-year career."

Gary Kreep, an attorney for Stein, said he would file appeals within the Marine Corps but expects they will be denied. He said he planned to file an amended complaint in federal court.

Original post: The Marine Corps has discharged a sergeant for his Facebook postings criticizing President Obama, the Associated Press reports.

The Corps said Sgt. Gary Stein will be given an other-than-honorable discharge for violating Pentagon policy limiting speech of servicemembers.

The discharge will mean he loses all benefits.

The San Diego-area Marine, who has served nearly 10 years in the Corps, has said he was exercising his free-speech rights.

A federal judge previously denied a request to block military discharge proceedings against Stein, who called Obama an enemy on Facebook.

U.S. District Judge Marilyn Huff ruled then that the military has the right to respond to Stein's online comments in a case that has called into question the Pentagon's policies regarding social media and the limits regarding the speech of active-duty military personnel.

Attorney J. Mark Brewer told Huff the entire process violates the First Amendment, which federal courts have the right to uphold.

Huff disagreed, calling Stein's postings "truly troubling." Servicemembers have had their speech limited since the Civil War, especially if their comments are believed to disrupt good order and discipline.

The judge pointed out Stein's March 1 comments on a Facebook page used by Marine Corps meteorologists in which the sergeant stated, "Screw Obama and I will not follow all orders from him."