The Liberals' Trent Zimmerman has won the federal by-election in North Sydney despite a swing of about 13 per cent against the party.

Key points: Zimmerman receives 47.6 per cent of counted votes

Zimmerman receives 47.6 per cent of counted votes Closest opponent is Independent Stephen Ruff (18.7 per cent)

Closest opponent is Independent Stephen Ruff (18.7 per cent) Count shows 13 per cent swing against Liberals

"Not all of the votes have been counted yet, but it's quite clear that with over 50 per cent of the ballots in that the Government is going to retain the seat of North Sydney," Mr Zimmerman said, announcing his victory at 9:30pm (AEDT).

"It is an incredible humbling honour to serve as your representative in the Australian Parliament."

At 10:45pm, with 66 per cent of the ballots counted, the Liberals had received 47.6 per cent of the vote ahead of Independent Stephen Ruff's 18.7 per cent and the Greens' 16 per cent.

Loading

Labor did not field a candidate for the by-election, triggered when former treasurer Joe Hockey quit Parliament.

Mr Zimmerman said he was pleased with the result.

"It looks like, based on our analysis, it'll end up being a 58 per cent result on a two-party preferred basis," he said.

"So that's a swing not uncommon in by-elections for a government, and about on-par on with what we saw in Canning a few months ago."

Mr Zimmerman is the current acting president of the Liberal Party, and a former staffer to Mr Hockey, and won preselection for the candidacy in October much to the chagrin of some within the party who described it at the time as a "stitch-up" because not all branch members of North Sydney were allowed to vote.

In winning the seat, Mr Zimmerman has become the first openly gay member of the Lower House, but he did not dwell on the fact during his victory speech.

"I know that tonight in some ways is a very historic moment for the Australian Parliament and I'm very cognisant of that fact," he said.

Also during his speech, he praised Prime Minister Malcolm Turnbull for his "inspiring positivism".

"Can I say PM, the message I heard time and time and time again is residents in North Sydney are inspired by your optimism, are inspired by your positivism and inspired by the way in which you are conducting your new Government," Mr Zimmerman said.

"I have no doubt the result tonight owes a large deal to the way in which Malcolm Turnbull is providing leadership to our country and the faith that North Sydney residents have in him continuing to do so in the months and years ahead."

Who is Trent Zimmermann? Born and raised in Sydney

Born and raised in Sydney Resident of North Sydney for 14 years

Resident of North Sydney for 14 years Elected to the North Sydney Council in 2004

Elected to the North Sydney Council in 2004 Current acting president of the Liberal Party, and former staffer to Joe Hockey

Current acting president of the Liberal Party, and former staffer to Joe Hockey Advocate for greater financial responsibility, revitalisation of North Sydney CBD

Advocate for greater financial responsibility, revitalisation of North Sydney CBD In winning the North Sydney by-election he became the first openly gay member of the Lower House

Mr Zimmerman also paid tribute to Joe Hockey for "his incredible 20 years of service to Australia".

"I cannot think of a person who has a bigger heart than Joe Hockey and I think that we saw that in everything he did in Australian politics and we owe him an enormous deal of debt and gratitude for all he's done for our electorate," he said.

The former advisor to the treasurer said he strongly supported marriage equality.

"I would have supported a free vote and preferred it to be decided by the Parliament," he said.

"But that's the path we are going to go down so I will be strongly advocating, both in North Sydney and more broadly, a Yes vote for that plebiscite."

Mr Zimmerman said he was proud to have his mother and sister with him to claim victory.

"Sadly my father passed away over 10 years ago and obviously I would have loved him to be here tonight because both my parents have given me my commitment to community service and the foundation of everything I sought to do in public life," he said.

Swing against Liberals in traditionally safe seat

A poster used by the Liberal Party NSW during the North Sydney by-election ( Supplied: Liberal Party NSW )

Based on results late on Saturday, the by-election saw a 13.4 per cent swing against the Liberal Party in what has been one of the safest federal Liberal electorates in Australia.

"There's only three times in the last 60 years that the Liberals haven't won it on first preferences," ABC election analyst Antony Green said.

Both times the Liberals lost the seat were to Ted Mack, an independent, Green added.

Meanwhile, the Liberal Party has denied using unauthorised posters at polling booths in the by-election.

Labor said there were posters featuring Mr Turnbull that did not feature the necessary authorisation.

But, a Liberal Party spokeswoman said "all material, including the corflutes featuring the Prime Minister, are authorised in accordance with the Electoral Act".

The fine for using unauthorised material is $5,000.