HARARE, Zimbabwe — A Zimbabwean judge on Friday ended the 17-day detention of an investigative journalist charged for tweeting about alleged corruption.

Hopewell Chin'ono is being charged with obstruction of justice arising from a tweet he made alleging corrupt practices within Zimbabwe's National Prosecuting Authority. He faces up to a year in jail or a fine if convicted.

He is being held in the harsh Chikurubi prison in the capital, Harare, where he was previously detained for six weeks before being granted bail on a separate charge of inciting violence in September.

High Court judge Tawanda Chitapi said Chin'ono should not use his Twitter account "to defeat or obstruct the course of justice" as part of the bail conditions on the latest charge.

Chin'ono is one of Zimbabwe's most prominent critics of President Emmerson Mnangagwa's administration, accusing it of corruption and human rights abuses. The government denies the charges.

Western embassies, journalists' associations and other sympathizers say Chin'ono is being targeted for using Twitter to expose government graft.

The U.S embassy in Harare on Friday said it would "continue to closely monitor the Zimbabwean government's use of the legal system to harass and punish" the journalist for reporting on corruption.