TransAsia crash
Emergency teams remove pieces of wreckage at the site of the crashed TransAsia Airways plane Flight GE235 in New Taipei City Feb. 5, 2015. REUTERS/PICHI CHUANG

(Reuters) - The pilot of a doomed TransAsia plane, hailed as a hero for his actions in the final moments before a crash that killed 31 people, was still holding the joystick in the plane's cockpit when his body was found, media reported on Friday.

The pilot, identified by TransAsia as 42-year-old Liao Chien-tsung, has been praised by Taipei's mayor for steering the plane between apartment blocks and commercial buildings before ditching the stalled aircraft in a river.

TransAsia Flight GE235 was carrying 58 passengers and crew when it lurched nose-up between buildings, clipped an overpass and a taxi with one of its wings and then crashed upside down into a shallow river after taking off on Wednesday.

The bodies of Liao and his co-pilot were retrieved from the almost-new turboprop ATR 72-600's cockpit still clutching the joystick, with their legs badly broken, investigators said.

"They were still trying to save this aircraft until the last minute," Taiwanese media quoted unidentified prosecutors involved in the crash investigation as saying.

Media quoted city officials as saying the death toll would have been much worse if the plane had crashed into any of the buildings it narrowly missed.

Fifteen people survived but 12 remain missing. Taiwan aviation officials have said they have not given up hope of finding them.

The voice and data recorders from the plane have been recovered and a more conclusive picture of the plane's final moments will emerge when information from them is released.

Media reported that some of the information could be released later on Friday.

The last communication from one of the pilots was "Mayday Mayday engine flameout", according to an air traffic control recording on liveatc.net.

A flameout can occur when the fuel supply to an engine is interrupted or when there is faulty combustion, but twin-engined aircraft can usually keep flying with one engine. The plane was powered by two Pratt & Whitney PW127M engines. Pratt & Whitney is part of United Technologies.

The plane took off from Taipei's downtown Songshan airport and was bound for the Taiwan island of Kinmen. Among those on board were 31 tourists from China, mainly from the southwestern city of Xiamen.

Taiwan's aviation regulator has ordered TransAsia and Uni Air, a subsidiary of EVA Airways Corp 2618.TW, to conduct engine and fuel system checks on the remaining 22 ATR aircraft they still operate.