There were no immediate reports of casualties at the Salawa military camp where security forces are known to store some of their heavy weaponry and ammunition, including rockets, police said.
Residents in Salawa, 36 kilometres (26 miles) east of Colombo, were seen leaving their homes as police reported shrapnel hitting the main highway as well as the built-up neighbourhood.
Sri Lanka's Deputy Foreign Minister Harsha de Silva, who was travelling in the area, said there was traffic chaos as residents escaped.
"Pretty chaotic scenes on the road...," he said on Twitter. "I am estimating that thousands are evacuating."
Pretty chaotic scenes on the road towards Kosgama. I am estimating that thousands are evacuating... https://t.co/gUgNLOnqYC
— Harsha de Silva (@HarshadeSilvaMP) June 5, 2016
The night sky was lit with a bright orange glow and the area shook at regular intervals. Flying debris could be seen from three kilometres away, an AFP photographer said.
"We have closed the road and asked all residents to leave out of consideration for their safety," a police officer at the scene told AFP.
Law and Order Minister Sagala Ratnayake said fire trucks were able to reach the site about three hours after the blaze started.
"The fire had quickly spread to two ammunition dumps and it was difficult to put out the fire because the fire trucks could not reach the place," Ratnayake told reporters.
He said the cause of the blast was not known, but the Criminal Investigation Department had been asked to investigate.
Sri Lanka says 100 missing in landslides are dead
Colombo health chief Palitha Mahipala said all hospitals were on red alert, but there were no reports of any casualties directly linked to the incident.
Military spokesperson Brigadier Jayanath Jayaweera confirmed the fire and explosions at the Salawa military complex, but said it was too early to say what had caused it.
The explosion was the worst at a military installation since the end of Sri Lanka's decades-long Tamil separatist war in May 2009.
In June 2009, there was a similar, but a much less intense explosion at an army ammunition dump in the northern district of Vavuniya, 250 kilometres north of Colombo, leaving several soldiers injured.
Government forces crushed Tamil Tiger rebels in a no-holds-barred military campaign that also triggered allegations of up to 40,000 ethnic Tamil civilians being killed in government bombardments.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ