Image copyright AFP Image caption Ma Ying-jeou said he would "shoulder the greatest responsibility" for the election defeat

Taiwan President Ma Ying-jeou has resigned as chairman of the governing party after it suffered a crushing defeat in local elections.

Mr Ma, who will continue as president, said his Kuomintang (KMT) had failed to reform Taiwan quickly enough and had not met the people's expectations.

The KMT lost more than half of the mayoral offices it had held, including the capital Taipei.

Prime Minister Jiang Yi-huah and his cabinet have quit over the results.

"I must deeply examine myself honestly and shoulder the greatest responsibility for the election defeat," Mr Ma said.

"The results of the election tell us our reforms were not made fast enough and have yet to meet the expectations of the people, which is why the KMT failed to win the support of most voters."

The KMT said it would hold a leadership election next month.

Analysis: Cindy Sui, BBC News, Taipei

Many voters no longer feel loyalty toward one party or the other.

In the past, long-time Taiwanese, whose ancestors came to Taiwan centuries ago, favoured the main opposition Democratic Progressive Party (DPP).

Those whose families fled here from China at the end of the civil war supported the KMT, but that is less the case now.

Analysts believe this is a positive step in the development of Taiwan's young and hard-won democracy.

Taiwan ruling party struggles after poll defeat

The main opposition DPP won 13 seats out of the island's 22 biggest cities.

The election was widely seen as a rejection of the KMT's push for closer ties with Beijing.

China and Taiwan have been ruled separately since the end of a civil war in 1949, with China seeing Taiwan as a renegade province.