SYDNEY (Reuters) - Australia has named a distinguished military leader as its next governor general, who represents Britain’s Queen Elizabeth, the country’s head of state, ahead of an election in May.

FILE PHOTO: Governor of New South Wales David Hurley (C), hosts (L-R) U.S. Secretary of Defence Jim Mattis, Australian Minister for Defence Marise Payne, Australian Minister for Foreign Affairs Julie Bishop and U.S. Secretary of State Rex Tillerson at Government House in Sydney, Australia, June 5, 2017 for the 2017 Australia-United States Ministerial Consultations (AUSMIN). REUTERS/Mark Metcalfe/Pool/File Photo

Prime Minister Scott Morrison announced on Sunday that David Hurley, former Australian Defence Force chief and current governor of the state of New South Wales, has been appointed to the office.

“I had only one choice, my first choice and he is standing next to me,” Morrison said from Canberra in a joint press conference with Hurley.

Hurley, 65, had a 42-year military career in the Australian Army culminating in his appointment as Chief of the Defence Force in 2011.

“I’ll be enormously proud to represent Australia in the role of governor general,” Hurley said.

The largely symbolic governor-general’s role has extensive though little-used powers.

The governor general is commander in chief of the armed forces, appoints ambassadors ministers and judges, gives royal assent to legislation and issues writs to call elections.

The current governor-general, Peter Cosgrove, had been due to finish his five-year term in March.

The opposition Labor party had urged the prime minister to extend Cosgrove’s service until after the May federal election so the incoming prime minister could choose the next governor general.

Instead, Morrison both appointed Hurley and said Cosgrove would extend his duties until after the federal election, allowing Hurley to conclude his duties as state governor of New South Wales, which has also has an election in March.

“This will mean that both NSW and Australia will have experienced governor and governor generals in place for the forthcoming elections,” Morrison said.

Australia is a constitutional monarchy, a legacy of its origins as a British colony.

The prime minister is Australia’s head of government, but formally reports on many matters to the queen’s representative.

The governor general almost always acts on the advice of the prime minister and parliament, but can also dissolve parliament and has done so in the past.

In 1975, when a parliamentary deadlock blocked funds for government expenditure, Governor General John Kerr dismissed Labor Prime Minister Gough Whitlam, replaced him with his conservative opponent and dissolved parliament for a general election.

Australia gained independence from Britain in 1901, but retained Britain’s Westminster parliamentary traditions dating back hundreds of years.