At least 12 people have been killed in a fast-moving wildfire that tore through a tourist area in Andalusia, southern Spain, trapping motorists in burning vehicles or as they tried to flee on foot.

Authorities said many of the victims of the fire that broke out on Thursday and destroyed forests and swathes of scrubland in the Los Gallardos area were believed to be foreign nationals and 19 people were still missing.

Antonio Sanz, Andalusia’s minister for emergencies, said the majority of the victims appeared to be foreign nationals.

"Everything indicates that the deceased are, mostly or entirely, foreign nationals."

He said the victims reportedly strayed from designated evacuation routes and sought an alternative exit via a river, a decision that ultimately turned into “a trap” when they were overtaken by the fire.