Malaysia's former prime minister Mahathir Mohamad quit the ruling party Monday in a move political observers said could undermine the beleaguered government of his successor Abdullah Ahmad Badawi. Mahathir announced in a speech in his home state Kedah that he was resigning in protest over Badawi's 'refusal' to step down despite March elections that produced the worst results in the history of the United Malays National Organisation (UMNO). "Mahathir has resigned from UMNO in protest over Pak Lah's continued leadership as both the prime minister and president of UMNO," Mahathir's son Mokhzani said. Pak Lah is Badawi's nickname, meaning elder brother. Badawi, in his initial reaction, said he was shocked. Despite their differences, he had not expected Mahathir to leave. However, the beleaguered premier said he would stay on and fight for the party. Mahathir quit along with another party veteran, Sanusi Junid,Star Online said. "Perhaps some other members might leave too, but this won't entirely affect the party. It all depends on whether the rest want to stay on and continue to fight for the party too," he said. News website Malaysiakini quoted Mahathir as urging all UMNO ministers and party leaders to follow his lead and return only when Badawi had departed. "Wait till Abdullah quits as the prime minister and party president and then we can return to UMNO," he was quoted as saying. Mahathir, 82, joined UMNO at its inception in 1946 and has since then weathered a number of storms including his expulsion in 1969 and a 1988 crisis when the party was declared illegal. Mahathir ruled Malaysia for 22 years until 2003 when he picked Abdullah as his successor. Within months the two had fallen out and Mahathir began accusing him of corruption, nepotism and mismanagement. Mahathir's quitting UMNO is bad news for Badawi and the ruling coalition Barisan Nasional that lost its two-thirds majority in the March election. The coalition emerged victorious, but badly weakened for the first time since Malaysia became free in 1957. Relations between Mahathir and Badawi have been strained off and on. Since the March elections, which saw the UMNO-led coalition lose five states and a third of parliamentary seats to the opposition, he has actively campaigned for Badawi to step down but the prime minister has refused to budge. The elections have also witnessed the return of Anwar Ibrahim, deputy prime minister whom Mahathir had sacked 10 years ago. Charged with sodomy and corruption, Ibrahim underwent a jail term. Ibrahim's wife Wan Azizah Wan Ismail is the leader of the opposition, commanding support of 62 members in parliament. Ibrahim has also forged an opposition alliance called Pakatan Rakyat and has been talking daily of toppling the Badawi government. Political observers said Mahathir's departure could make it easier for coalition lawmakers to defect to Ibrahim. The country could go for fresh elections in such a situation.