The plane that crashed in Madrid on Wednesday, killing 153 people, had an air intake valve that overheated before a first attempt at takeoff, owner Spanair said.

However, Spanair officials said Thursday it was not immediately clear whether the overheated valve was a factor in Wednesday's accident, which only 19 people survived.

Spanair spokesperson Javier Mendoza said the valve overheated in the front of the plane and technicians corrected the problem by turning it off.

The plane was then cleared for a second takeoff since the valve did not have to be functional for the aircraft to fly.

The flight was headed to Las Palmas in the Canary Islands, a popular holiday destination off of Western Africa.

However, during the second takeoff, the jet smashed into the ground and burst into flames.

"There are still unconfirmed reports that the left engine of the plane had caught fire while taking off," ABCs Sonia Gallego told CTV's Canada AM Thursday from Madrid.

Witnesses said they saw the plane lurch to the left immediately after leaving the runway and then the engine burst into flames.

The MD-82's two black box recorders have been recovered but one is damaged, said Mendoza.

Meanwhile, Spain began three days of mourning Thursday with flags flying at half-mast.

Spain's king and queen also planned to visit a makeshift morgue for the victims.

Most of the survivors suffered second and third-degree burns and fractures in the crash and have been taken to a number of different hospitals in the area for treatment.

The Spanish Airport Authority, the Spanish Air Force and Boeing will be investigating the crash as will the U.S. National Transport Safety Board because the aircraft was built in America.

With files from The Associated Press