In a shock loss for the Greens, Labor has held onto the federal seat of Batman in a by-election in the inner-Melbourne seat.

Key points: There has been no formal declaration, but Labor is predicted to retain the seat

There has been no formal declaration, but Labor is predicted to retain the seat Richard Di Natale blamed the Greens' loss on preference deals

Richard Di Natale blamed the Greens' loss on preference deals Ms Kearney's victory takes female representation in the federal caucus to 48 per cent

The Greens had been the favourite throughout the campaign, but the odds had narrowed in the final week.

While an official result is yet to be declared, the Greens conceded defeat about 9:00pm last night.

Greens leader Richard di Natale blamed the loss on Labor doing preference deals with conservative parties, despite figures showing Labor leading on the primary vote.

"We had big money spent during this campaign, we fought vested interests and we did it with people power," he said.

Dr di Natale told the assembled party faithful the Greens had lost the Melbourne by-election for the seat of Melbourne in 2012.

"We lost that by-election, we came back and we won it at the next general election," he said.

"We will be back."

Sorry, this video has expired Caped Crusaders swarm the seat of Batman

Greens candidate Alex Bhathal has run — and lost — in the seat of Batman six times.

She congratulated Ged Kearney on her win.

"This was always going to be a tough contest, we knew that Labor would throw everything they had at this seat to hold it after 84 years," Ms Bhathal said.

"We in our team have run our enormous grassroots campaign with nearly a thousand volunteers against the huge money, the corporate donations money, that is able to be spent by the Labor party.

"We've run this campaign with integrity, with heart and with hard work."

Kearney 'the hero of Batman'

The mood was jubilant at the Labor post-election event as the numbers began coming in.

Opposition Leader Bill Shorten said it was a victory for the party, and a step towards giving Australians the sort of government they wanted.

"Australians in Batman have given Labor a chance, and our promise is, we will not let them down and we will work harder," he said.

Bill Shorten and Ged Kearney celebrate her victory. ( ABC News: Andrew Altree-Williams )

Mr Shorten said Ms Kearney would be the first woman to hold the seat in 112 years.

"And when she attends the first caucus meeting of the Federal Labor Parliamentary Party, she will bring the ranks of women in the Labor Party to 48 per cent," he said.

"Ged Kearney, the hero of Batman."

Labor supporters celebrate as votes are counted. ( ABC News: Andrew Altree-Williams )

Ms Kearney said her opponent had run a good, hard-fought campaign.

She said the win was a victory for traditional Labor values.

"I want to thank Bill Shorten and the Labor family for putting their trust in me to run in this seat," she said.

"And guess what everybody? I'm on my way to Canberra! And Labor is on its way to a Shorten government.

"I want the people of Batman to know that I have listened, and Bill Shorten has listened, and we are going to take everything you've said to Canberra."