Zimbabwe’s former president Robert Mugabe and his wife, Grace have been granted immunity from prosecution.

The military made the announcement on Thursday through Overson Mugwisi, spokesman for the Zimbabwean Defense Forces; he said the couple would be allowed to remain in the country. He said that an agreement had been reached with Mugabe that included immunity and a guarantee of safety for the former leader and his wife, Grace Mugabe.

Mugabe resigned on Tuesday, in a historic moment that brought his 37 years of oppressive rule to an end. The former leader has been accused of ordering a string of massacres in the early to mid-1980s in opposition strongholds to consolidate his power, in which up to 20,000 people were killed.