An American woman charged with subversion in Zimbabwe over allegedly insulting President Robert Mugabe on Twitter has been released from prison on bail.

Witnesses saw Martha O'Donovan, 25, emerge from the Chikurubi maximum security prison outside the capital, Harare, on Friday and leave in a US embassy vehicle.

Her lawyers did not speak to the news media, but O'Donovan will return to court on Wednesday.

Judge Clement Phiri of the High Court said on Thursday that there was a "patent absence of facts" in the state's case against O'Donovan, who was arrested last week on accusations she insulted Mugabe, 93, in a Twitter post.

O'Donovan is accused of calling Mugabe a "selfish and sick man" in a tweet that included an image of him with a catheter.

O'Donovan faces up to 20 years in prison if convicted for subversion. She also faces a charge of undermining the authority of or insulting the president, which carries up to a year in prison.

{articleGUID}

She has denied the charges as "baseless and malicious".

Judge Phiri's ruling, which was made in her absence on Thursday, granted O'Donovan $1,000 bail on the grounds that the state failed to exhibit the contents of the alleged tweets calling on people to protest against the government.

Her lawyer, Obey Shava of Zimbabwe Lawyers for Human Rights, a legal nongovernmental organisation, told Al Jazeera he was pleased with the court order.

"I am very happy that justice has been done, I'm glad that my client has been vindicated because we have always argued that she was a perfect candidate for bail," he said outside the court on Thursday.

O'Donovan has spent at least three days in Chikurubi prison, which has gained notoriety among locals for its squalid conditions and frequent food shortages.

Farai Munroe, a local comedian also known as Comrade Fatso and cofounder of Magamba TV, told Al Jazeera that he was very pleased with the court's ruling.

"We are all very ecstatic with the bail ruling, everyone at Magamba and everyone that has supported the process," he said.

"I think the judge showed the state lacked a strong case, lacked evidence and we are ecstatic that step one has been achieved in this struggle to free Martha and that is that she has got bail."

Political satire creator

O'Donovan, employed as a programme associate of Magamba TV, an online channel that describes itself as Zimbabwe's leading creator of political satire, was arrested and taken into custody last week over allegations she published a tweet that described Mugabe as a "goblin".

Charges of attempting to overthrow a constitutionally elected government were later added to her docket and upheld by the courts.

According to David McGuire, the public affairs officer of the US embassy in Zimbabwe, representatives from the consular service have maintained "direct and daily contact" with O'Donovan.

She is reportedly in good health.

McGuire said while he was unwilling to speculate on the overall outcome of the case, the US embassy was encouraged by the bail ruling and was hopeful of a positive result in the end.

"The US embassy is watching [this case] very closely, and we will stand by the process every step of the way, we are very hopeful for a positive outcome," he said in a telephone interview.

O'Donovan's arrest marks the first internet abuse case since the creation of a cybersecurity ministry in a cabinet reshuffle last month.

The Mugabe government says the ministry is designed to monitor cybersecurity and detect possible threats and breaches of future laws governing social media use.

O'Donovan is expected to report to the police on a bi-weekly basis and submit her travel documents to the clerk of court until the trial, which is set to continue later this month, is over.

Tendai Marima contributed to this report. Follow him on Twitter and Instagram @i_amten