John Alexander with PM Malcom Turnbull at Ryde-Eastwood Leagues Club. Credit:Christopher Pearce During that time, same-sex marriage was legalised, Labor senator Sam Dastyari resigned from Parliament and two ALP MPs were referred to the High Court over potential dual citizenship. The result was far better for the government than senior Liberal figures had been bracing for, and the swing was well below what a series of opinion polls predicted in the final week of the campaign. An ebullient Prime Minister said Mr Alexander "had everything thrown at him". Every lie that Labor could dream up was thrown at him," he said.

Labor supporters watching the news on television as the results roll in. Credit:Alex Ellinghausen "But, John, as always, was straight and true and honest and he stuck to our principles and our policies." In his victory speech, Mr Alexander hailed the "extraordinary moment" and predicted it would be a "renaissance" for the Prime Minister's leadership. Jubilant Liberal supporters wait for Prime Minister Malcolm Turnbull to speak. Credit:Christopher Pearce "This event over the last five weeks, I think, under Malcolm, has brought us together. It's been the most unifying and humbling experience," Mr Alexander said.

Government frontbencher Concetta Fierravanti-Wells also called for the Liberals to unite following the win: "The time has come for those people who have been back grounding [against Mr Turnbull] to stop". Prime Minister Malcolm Turnbull with Liberal candidate John Alexander at Gladesville Public School. Credit:James Brickwood Ms Keneally congratulated Mr Alexander but emphasised that Labor had managed a 5 per cent swing to it - on a two-party preferred basis - in a safe Liberal seat. "If this result was replicated at a general election, we would see 24 to 28 seats fall...that would mean a Labor government and Bill Shorten as our prime minister," she said. Labor candidate for Bennelong Kristina Keneally on the campaign trail on Saturday. Credit:Alex Ellinghausen

However, swings are not uniform in a general election and the two-preferred vote may fall as large number of pre-poll and postal votes, which typically favour the Liberals, are counted. "I know when we do go to the next election, there will be millions of Australians who want to have their say on Malcolm Turnbull and his lousy government." Ms Keneally is now favourite to take the Senate seat vacated by Mr Dastyari. Mr Shorten claimed the entire swing to Labor was "attributable to Malcolm Turnbull and his rotten policies for this country" and that the ALP finished 2017 with "a most remarkable wind in its sails". As it became clear the Liberal Party would win, Defence Industry Minister Christopher Pyne suggested Labor had over-hyped how well it would do - Mr Shorten had campaigned heavily in the seat - and that the opposition leader was "toxic" in the electorate.

Senator Cory Bernardi's new Australian Conservatives party secured a primary vote of about 5 per cent, with much of that at the expense of Fred Nile's Christian Democratic Party. The Greens have seen a fall in the primary vote of about 1.5 per cent, to 7.5 per cent. Mr Alexander was forced to resign from Parliament in November after Fairfax Media revealed he was likely a dual citizen. Mr Alexander secured a thumping win in the seat in 2016, winning the two-party preferred vote 59.7 per cent to 40.3 per cent, but the government has been bracing for a swing against the sitting MP. Between 1949 and 2014, the average two-party preferred swing against the government of the day has been 5 per cent, according to a paper from the Parliamentary Library.

If Labor had claimed a shock win in the Sydney seat, the Turnbull government would have been reduced to 75 seats in the 150 member House of Representatives. The byelection has been complicated by the tense debate about foreign interference in Australian politics, which has seen Senator Dastyari announce his resignation following a string of revelations about his involvement with Chinese Communist Party-aligned interests. The issue has come into sharp focus in Bennelong given the electorate's large Chinese-Australian population.