At least eight people were killed and 13 others were injured on Wednesday after explosions and gunfire at Myanmar's biggest jail, according to media reports and an account from a witness.

Three officials and five visitors died at Yangon's colonial-era Insein prison after two explosions and gunfire was heard at about 9.40 am local time near the facility's parcels counter, according to news portals Myanmar Now and IrrawaddyNews.

It was unclear what caused the explosions and representatives of the prison and the military government could not immediately be reached for comment.

A witness told Reuters soldiers at the prison had opened fire in response to the blasts.

"As soon as I heard the blast, I ran out and that's when I got hurt. The soldiers...at the entrance gate fired shots recklessly," said the witness, who declined to be named because of security reasons.

The witness said they were about 10 feet (3 metres) away from the blasts and were not hurt by the explosion but from shrapnel from the gunfire.

Police were at the scene and inspecting the site of the explosions shortly afterwards, media reported.

Prison staff and couriers who were seriously injured were evacuated from the prison, while those not seriously injured were treated at nearby shops, according to BBC Burmese.

A number of cases scheduled to be heard in the adjacent court, were cancelled after the explosions, according to media reports.

Insein is the country's most notorious prison and thousands of political prisoners have been sent to the facility since last year's military coup.

Myanmar has been in chaos since the military overthrew an elected government led by Nobel laureate Aung San Suu Kyi's party, and launched a brutal crackdown on dissent.