Two girls, aged 12 and 14 and a 21-year-old man were killed in the blaze on Monday night after they became trapped inside the burning cave on the outskirts of the city of Almería in southern Spain.
It is thought that the blaze was started around 8pm outside the cave in the La Molineta district but then spread to the opening of the cave and an old sofa and furniture dumped within it, trapping the trio inside.
A fourth person is understood to have escaped from the burning cave.
The cave was reportedly a regular after school hangout among teenagers, according to the local newspaper Ideal.
Todo lo que se sabe hasta ahora del fatídico suceso que se llevó la vida de tres jóvenes en Almería, en 30 segundos https://t.co/1tvbYBAEJH— ideal_almeria (@ideal_almeria) April 5, 2017
Investigators say that the 17-year-old in custody for the crime said he had not intended to kill anyone but started a fire with a cigarette lighter that he then tried to extinguish but it "got out of hand".
Four other teenagers at the cave at the time were questioned and called to give witness statements to a judge on Wednesday.