Former Australian leader Malcolm Fraser dies at 84

This file photo taken on March 4, 2010 shows former Australian prime minister Malcolm Fraser (R) attending the launch of his first political memoirs at the University of Melbourne's Law School. Fraser, who served as the nation's leader from 1975 until 1983, died on March 20, 2015 after a short illness at the age of 84, his office said.

SYDNEY - Former conservative Australian Prime Minister Malcolm Fraser, who led the country from 1975 to 1983 but later turned against his party over its tough immigration policy and involvement in the Iraq war, died on Friday, his office said. He was 84.

The country's 22nd prime minister died peacefully in the early hours after a brief illness, his office said in a statement. It did not elaborate.

"We appreciate that this will be a shock to all who knew and loved him," it said.

Fraser's death comes five months after the death of his predecessor and former Labor opponent Gough Whitlam, marking an end to one of Australia's deepest and best-known political rivalries.

"It is the end of an era, two towering figures who created a huge impression on many generations of Australians," Treasurer Joe Hockey told media.

After joining the House of Representatives aged 25 in 1955, then the youngest member of parliament, Fraser became prime minister 20 years later when the governor general sacked Whitlam for his inability to pass budget bills through the Senate.

For years seen as an enemy by Whitlam's centre-left Labor party, Fraser distanced himself from his Liberal party in the 1990s and 2000s, opposing its determination to retain the British monarchy, detain asylum seekers in offshore camps and join the Iraq war. He quit the party in 2010.

As such, Labor came to embrace the man it had for years seen as its nemesis.

Former Labor prime ministers Kevin Rudd, Julia Gillard and Paul Keating issued statements mourning Fraser, with Rudd describing him as "a compassionate Australian who cared for people at home or abroad who had little or nothing to protect them".

Fraser also made amends with the man he hounded while in office, revealing that he met Whitlam frequently in post-political life. "I valued my friendship with him," he was quoted as saying after Whitlam died.

His remarks on his own party were less cordial, describing Liberal Prime Minister Tony Abbott in 2014 as a "dangerous politician".

Abbot said in a statement Fraser "held true to the belief that his actions were in the best interests of Australia" and praised his campaign against apartheid in South Africa.

Fraser's illness did not slow his use of social media to comment on subjects from climate change to cricket to the Israeli election.

His final message, on Wednesday, was a link to an article calling for Australia to improve relations with China.