MOSCOW (Reuters) - A Russian court sentenced a prominent hacker to two years in jail on Thursday after a secret trial which heard how he had accessed and leaked the email accounts of top government officials, Russian news agencies reported.

The court found Vladimir Anikeyev, named as head of a famous hacking collective called Shaltai Boltai (Humpty Dumpty), guilty of illegally accessing computer data in collusion with a criminal group.

The TASS news agency said he was accused of breaking into the email account of Prime Minister Dmitry Medvedev’s spokeswoman as well as the account of an official in the presidential administration among many others.

Anikeyev was detained last November and reported to have struck a pre-trial agreement with prosecutors after admitting his guilt, resulting in his receiving a relatively mild jail sentence, news agencies reported.

The sensitive nature of the trial meant the court hearings were held behind closed doors with no public access.

Russian media said Anikeyev and his group had stolen personal data from computers and other electronic devices belonging to well-known people, sometimes selling the data via the Internet.