A Chinese businesswoman was sentenced on Monday to eight months in prison and ordered to be deported for trespassing at President Donald Trump's Mar-a-Lago club in Florida carrying a trove of electronics.

The woman, Yujing Zhang, 33, was convicted in U.S. District Court in Fort Lauderdale in September of entering a restricted building and making false statements to a federal officer.

When she was stopped at the president's club in Palm Beach on March 30, Zhang initially said she was there to use the pool, but she raised suspicions because she hadn't brought along a swimsuit, according to court documents and testimony at her trial.

She then changed her story, saying she was there to attend a U.N. friendship event between the United States and China, authorities said. Investigators said evidence on one of her cellphones demonstrated that she knew the event had been canceled.

That brought in the Secret Service, which said that when agents detained her, Zhang was carrying four cellphones, a laptop computer, a hard drive and a thumb drive.

President Donald Trump was in town when Yujing Zhang showed up at Mar-a-Lago in Palm Beach, Florida, but he was off the premises golfing. Joe Raedle / Getty Images file

Initial court documents said the thumb drive was found to contain "malicious malware," but prosecutors said later that that may have been a false positive. Either way, prosecutors said, Zhang was determined to see Trump, who was in town at the time but was out golfing when she showed up.

The full story remains unclear, because prosecutors filed secret evidence under seal, saying it had national security implications. Judge Roy Altman wrote in court papers that releasing the evidence could cause serious damage to the country.

Download the NBC News app for breaking news

The trial, itself, was at times bizarre. Zhang fired her attorneys in June and represented herself, much to the annoyance of Altman.

And jury selection had to be halted briefly when Zhang showed up in court wearing brown jail clothing, even though defendants generally wear civilian clothing so prospective jurors aren't prejudiced against them.

Zhang told Altman that she hadn't been provided with any underwear. She was taken to a holding cell and changed into a copper blouse and khaki slacks that had been found in her hotel room.

Altman ordered Monday that Zhang be deported after she completes her eight-month sentence, which would be next week, because she was credited with having served the almost eight months she has been in custody since she was arrested.