HARARE, Zimbabwe — An American woman who was arrested in Zimbabwe in November over a tweet mocking Robert Mugabe, weeks before he was forced out as president, was set free on Thursday after state prosecutors failed to prepare their case.

The woman, Martha O’Donovan, 25, had been working in Harare, the capital, for the Magamba Network, a website focusing on youth activism and culture. She was charged with subverting the government and undermining the authority of the president, and faced up to 20 years in prison.

Ms. O’Donovan denied that she was responsible for the tweet, which read, “We are being led by a selfish & sick man” and was posted on an anonymous account, @matigary, that remained active after she was arrested.

The High Court ordered Ms. O’Donovan’s release on Thursday, after prosecutors said they were not prepared to provide a trial date.