The North Jakarta fire department said 16 people including two children were killed in the fire, which injured at least 50 more.
Many of those killed and injured suffered severe burns after the fire broke out, department chief Satriadi Gunawan told AFP.
The cause of the fire, which started after 8 pm local time (1300 GMT), was not clear.
The blaze was put out several hours after it started, army chief of staff Dudung Abdurachman told reporters.
“The fire is already extinguished,” he said.
The military chief and Pertamina said they were investigating the cause.
“Pertamina is focused on handling the fire and evacuating workers and residents nearby to a safer location,” the company said in a statement.
The oil and gas firm’s chief executive Nicke Widyawati said it would “conduct a full internal evaluation… to prevent the reoccurrence of a similar event.”
She said the country’s fuel supply had not been disrupted, remaining secure through backup supplies from the nearest available terminals.
– Second blaze in years –
Heru said the Indonesian government would contribute to the treatment of the injured.
Erick Thohir, the country’s minister of state-owned enterprises, expressed his condolences for those killed and injured.
“We are all saddened by his tragedy,” he said in a statement, calling on Pertamina to fully investigate the incident.
Footage broadcast on TV showed people screaming and fleeing through narrow roads with a raging inferno in the sky behind them.
Firefighters were also shown rushing to the scene to control the blaze as ambulance workers transported body bags to hospitals.
Gunawan said firefighters initially received reports a pipe had burst at the depot and officers quickly worked to contain the blaze from reaching nearby residential areas.
Jakarta’s main fire station said it had deployed 51 units and more than 250 firefighters to the Plumpang depot in north Jakarta.
In 2021 a massive blaze broke out at the Balongan refinery in West Java, also owned by state oil company Pertamina and one of Indonesia’s biggest oil refineries.
The fire raged for two days and caused thousands to be evacuated after a huge explosion.