A plane has crashed in a failed emergency landing in Taiwan, killing 51 people, according to the Central News Agency.

The news agency cited the head of the fire department in the county of Penghu as saying that seven people were injured in the crash.

The report cites the Civil Aviation Administration as saying the flight - operated by a Taiwanese airline, TransAsia Airways – crashed with 54 passengers and four flight crew on board.

The report said the plane seems to have crashed in an attempt to make an emergency landing in the city of Magong.

Update at 3.30pm

The plane was making a second landing attempt in stormy weather, fire officials said.

Taiwan had been battered by Typhoon Matmo and the Central Weather Bureau was advising of heavy rain through the evening, even though the centre of the storm was over mainland China.

The flight was heading from the capital Taipei to the island of Penghu, halfway between the Chinese mainland and Taiwan. Pictures from the airport showed a handful of firefighters using torches to look at wreckage in the darkness.

A TransAsia Airways plane with 58 people from Taiwan's Kaohsiung to Penghu has crashed into two houses, killing 51. pic.twitter.com/zLa922fsPD — The Straits Times (@STcom) July 23, 2014

Penghu is a lightly populated island that averages about two flights a day from Taipei.