Updated

An attorney for a mentally ill man accused of trying to join al-Qaida-linked fighters in Syria asked a federal appeals court Thursday to overturn a ruling that would allow his client to be forcibly medicated, arguing that neither the public nor the government would be harmed if the man was civilly committed instead of prosecuted.

Joseph Gilbert told a three-judge panel of the 4th Circuit Court of Appeals that civilly committing Basit Sheikh would virtually ensure he wouldn't be released to the community any time soon. He suggested that allowing the government to forcibly medicate in this case could open the door for many more to follow.

"If you allow it in this case, there's no case where the government wouldn't be able to say: `Serious crime, we should be able to stick him with this medicine,"' Gilbert said.

Sheikh, of North Carolina, is charged with providing material support to a terrorist group for attempting to join Jabhat al-Nusra militants. He was arrested almost two years ago in an FBI sting to find and arrest Americans before they fought in Syria.

A federal judge ruled in October that Sheikh could be forcibly injected with anti-psychotic medication to see if it would make him competent to stand trial. Prosecutors say Sheikh refuses to talk to doctors and has resisted physical exams.

Assistant U.S. Attorney Phillip Rubin rejected Gilbert's suggestion that retribution against Sheikh is the only interest the government has in prosecuting his case instead of civilly committing him. Rubin argued that Sheikh's prosecution would protect the public by deterring others from trying to join terror groups.

"This is a priority for the executive branch," Rubin said. "Those interests demand a prosecution here."

Rubin also dismissed Gilbert's claim that the government failed to show that the proposed treatment ensures Sheikh is competent to stand trial. He said that a research study discussed by one of the doctors who testified at an earlier hearing showed that nearly 80 percent of the 133 federal defendants who were forcibly medicated between 2003 and 2009 were restored to competency.

Court orders to forcibly medicate a suspect before trial are rare, but not unheard of. There were only about 77 such cases in federal courts nationwide in the nine years after the Supreme Court ruling through mid-2012, according to a 2013 study by Georgetown University law professor Susan McMahon.

Jared Loughner, who killed six people and wounded 13 including U.S. Rep. Gabrielle Giffords in Arizona in 2011, was forcibly medicated for schizophrenia at a federal prison medical facility so he could be competent to understand the charges against him. He pleaded guilty and is serving a life sentence.