A Chinese court has convicted an American businesswoman of spying, sentencing her to three and a half years in prison and deportation.

Sandy Phan-Gillis, a resident of Houston, has been in custody in China since March 2015 when she was detained during a business trip with officials from Texas.

One of her lawyers, Shang Baojun, said she pleaded guilty Tuesday to espionage charges in a closed court hearing in the southern Chinese city of Nanning.

It wasn't immediately clear how much longer Phan-Gillis will remain in Chinese detention before she is deported.

Related: Canadian imprisoned in China released after 2 years

Her husband, Jeff Gillis, has been campaigning for her release, insisting that she's innocent. He has said in the past that he has documents that show she was in the U.S. during the period in the 1990s when she is alleged to have spied for the American government in China.

Phan-Gillis may have chosen to plead guilty at her trial in order to try to secure an earlier release.

"She's supposed to serve the sentence in China," Shang said. "But maybe there's a condition based on which she can be deported to the U.S. before the imprisonment. We hope she can return to the U.S. as soon as possible."

China hasn't publicly released details of the allegations against her. Shang said he wasn't permitted to reveal further information about the case without official approval because it concerns national security.

The U.S. State Department has repeatedly raised Phan-Gillis' case with the Chinese government.

The U.S. Consulate in Guangzhou, a major city in southern China, didn't respond to a request for comment Wednesday.