(CNN) -- British mercenary Simon Mann, jailed last year for his part in plotting a coup in Equatorial Guinea, has been granted a presidential pardon, the country's Information Ministry said Tuesday.
The pardon was given on humanitarian grounds, taking into consideration Mann's health and age, his need to receive regular medical treatment and to be with his family, the ministry said.
Mann is allowed to leave the country immediately and is banned from returning, the ministry said.
A former British military officer, Mann was serving a 34-year sentence for his part in plotting the coup. He confessed during the trial last year that he tried to topple long-time ruler Teodoro Obiang Nguema Mbasogo -- but he denied being the plot's leader.
During the trial, Mann testified he was a "junior" in the organization which plotted to overthrow the tiny west African country's president in 2004, and that Lebanese businessman Eli Calil was the man in charge.
Mann is a former British army commando who was arrested in 2004 after a plane carrying him and about 60 mercenaries landed in Zimbabwe.
The government of Equatorial Guinea said the group was on its way to overthrow its president. Mann said at the time they were going to guard a diamond mine in the Democratic Republic of Congo.
A Zimbabwe court convicted Mann of trying to buy weapons illegally. He served four years in jail there before being extradited to Equatorial Guinea's capital of Malabo last year to face charges of leading an abortive coup.
Mann testified that his former friend Mark Thatcher -- the son of former British Prime Minister Margaret Thatcher -- was a main partner in the plot.
Thatcher was arrested along with Mann in 2004, and he pleaded guilty in South Africa the following year to unwittingly bankrolling the plot. He escaped jail time by paying a fine.
Thatcher admitted giving $275,000 toward the charter of a helicopter, saying he thought was for commercial purposes and discovered only later it was to be used by mercenaries.
But Mann said Thatcher paid $350,000 for a helicopter and a plane which he knew would be used in the plot, and that he attended meetings about the plan with Calil in London.
Calil, Mann said, initially asked him to assassinate President Obiang and talked about the possibility of staging a guerrilla war. Mann testified he refused both requests, considering them unethical, but he did agree to help stage a coup.
Though he said Thatcher was a top figure in the plot, Mann testified that even Thatcher was under Calil in the group's hierarchy.
Mann emphasized that he was not the man in charge.
The announcement of Mann's pardon came on the eve of an official visit to Equatorial Guinea by South African President Jacob Zuma, the Information Ministry said.
Four others implicated with Mann in the coup plot were also granted presidential pardons. They are Nicolaas Servas du Toit, the main organizer for the coup plot in 2004, and Sergio Fernando Patricio Cardoso, Jose Passocas Domingos and Georges Olympic Nunez Alerson.
Du Toit was sentenced to 34 years in prison and the others were sentenced to 17 years.
CNN's Claudia Rebaza in London, England, contributed to this report.