The train, which was traveling from Valencia to Zaragoza, was forced to stop between two stations because it was dangerously close to one of the several forest fires raging in Spain, reports El País.
The conductor must then have asked the train's 48 passengers to remain on board.
Some panicked, broke several windows and jumped off the train to escape the flames.
Realizing how close the fire was, they returned to the train.
At least eleven people were burned and three of them seriously.
The people received immediate help on board the train, which was forced to reverse to get to the town of Caudiel where medical personnel were waiting.
Over 270,000 hectares have burned down in Spain
Among the three seriously injured people, one was taken to hospital by helicopter.
The other two were picked up by ambulances, writes El País.
The fire that ravaged the train started in the town of Bejís in Castellón province on Monday.
Since then, 4,000 hectares have burned down and over 2,000 people have been evacuated, several Spanish media report.
In total, over 270,000 hectares have burned down in Spain this year, according to the state radio and television company RTVE.