Sierra Leoneans spent Sunday under a nationwide curfew amid disarray in the capital, Freetown.
The information minister described the attacks as “coordinated and planned”.
A BBC correspondent saw armed men on the streets chanting that they would “clean” Sierra Leone.
As well as the 13 soldiers, one police officer, one civilian, and a private security employee were also killed along with three of the attackers, Army spokesman Col Issa Bangura said.
Eight soldiers were also wounded in action.
In the attack on one of the prisons, some 1,890 inmates escaped, the Reuters news agency said, citing a situation report.
The violence was a “very serious breach”, Information Minister Chernoh Bah told the BBC’s Newsday programme on Monday morning, after the curfew had been lifted.
“These were coordinated and properly planned attacks on the security and wellbeing of our state.”
Mr. Bah said current and former military officials were among those involved, some of whom have been detained by security forces.
Gunmen, witnessed by the BBC’s Umaru Fofana in Freetown on Sunday, wore military uniforms and balaclavas.
Addressing suggestions that there had been an attempted coup, Mr Bah said: “We have apprehended some of the major leaders of yesterday’s attack and they are currently being interrogated by our security forces.
“Once they can ascertain the full intent of their actions… we will make a declaration on whether it was an attempted coup.”
Several countries in West and Central Africa are under military rule after a series of recent coups. These include Sierra Leone’s neighbour Guinea as well as Mali, Niger and Chad.
Our correspondent says he understands that the gunmen intended to storm the presidential residence on Sunday morning. However, they moved on after failing to take control of a nearby armoury and overcome President Julius Maada Bio’s security.
A former President, Ernest Koroma, also came close to Sunday’s violence.
A military source on Sunday told the BBC that one of Mr Koroma’s guards had been detained – hours later the former leader announced that a guard of his had been killed and another abducted.
In a statement, Mr Koroma said he “strongly condemned” the violence, in which “Corporal Eddie Conteh was reportedly shot at point blank range while his colleague, Warrant Officer John Swarray was whisked away to an unknown location”.
The information minister echoed President Bio in insisting order has been restored in the capital. The sound of gunshots had drastically decreased overnight and the atmosphere was calmer, witnesses said.
However, Mr Bah said a “manhunt” for gunmen and the escaped prisoners is ongoing.
In a televised address on Sunday evening, the president described the events as a “breach of security” and an attack on democracy.
A new nine-hour night-time curfew will begin at 21:00 local time (21:00 GMT) on Monday, the information ministry says.
As daily life began to resume in Freetown, one passer-by told the BBC: “Yesterday was like hell on earth for some of us that reside beside the central prison or close to the state house.
“We are happy that from the government’s side, they have put everything under control for now.”
Another complained: “We don’t want to see this type of thing in this country because we have day-to-day activities… I have my family. This is too much. Every five or six months we get this.”
The political situation in Sierra Leone has remained tense since June when President Bio was re-elected – narrowly missing out on the need to have a run-off.
International observers have condemned inconsistencies and a lack of transparency in the count, as well as acts of violence and intimidation.
In August, a number of soldiers were arrested and accused of plotting a coup against the president.
The US, European Union, UK and regional bloc Ecowas released statements strongly condemning Sunday’s violence.
On Monday afternoon, Sierra Leone’s information ministry said a delegation from Ecowas and Nigeria was set to arrive in Freetown for a meeting with the foreign minister.
Source: bbc.com