Labor’s biggest election commitments ignored the tightly contested Prahran electorate and this proved to be the party’s undoing — according to provisional results announced late last night, it has lost the race by as few as 21 votes. The battle between the Liberals and Labor over the East West Link toll road through the inner-north of Melbourne had barely any impact on Prahran, and the promise to remove 50 level crossings didn’t land any works in the seat either.

As a recount swings into action this morning, provisional victor Sam Hibbins spoke to reporters claiming Prahran for the Greens — a historic win for the party that has now taken a seat from both major parties in the Victorian lower house for the first time.

Liberal incumbent Clem Newton-Brown was a popular MP, and many thought the Greens would struggle to get a foothold in the affluent inner-Melbourne seat. Associate Professor Paul Strangio from Monash University says he is surprised Prahran was in play for the Greens. “That was a strategy built on some particular assumptions on demographics which now appear to have been borne out,” he said. He says it’s a highly diverse seat, with Liberal strongholds in Toorak and South Yarra, and further south it becomes a “classical Green target seat” with young, renting voters and couples with no children. “I think Prahran is quite a unique seat in their complex and very diverse demographics and therefore voting behaviour patterns,” he said, adding that it was a result “not easily replicated” elsewhere.

For his part, Hibbins says his success was due to his role as a Stonnington councillor and Greens volunteers’ effort to doorknock more than 20,000 houses. “We worked hard, we spoke to voters individually one-on-one. We knocked on their doors, we had conversations with them then and there,” he said. “I think it really shows that for the Greens when we work, when we do a strong grassroots campaign, when we put forward our campaign to the voters then they’ll vote for us.” He has pledged to reject any donations from property developers and to increase public transport capacity.

Labor candidate Neil Pharaoh did not comment on election strategy but said there were ballot irregularities and the potential for ballots to have been misplaced.

At all times Newton-Brown had an impressive lead of 44% or more of the primary vote, though he never broke through to a majority. But the distribution of preferences proved vital to the way the provisional result has favoured Hibbins, putting him ahead of incumbent Newton-Brown by 262 votes after preferences were distributed.

The contest between Pharaoh and Hibbins was always for preferences, and they were within about a single percentage point of primary votes throughout the count. Hibbins benefited from strong preference flows from Animal Justice Party candidate Eleonora Gullone to bring him 41 votes shy of level with Pharaoh. He also took about 40 more votes from Family First candidate Alan Walker than Pharaoh did. If Pharaoh can find 21 votes, either primary or from preferences, before the final stage in the distribution of preferences, he could still win the election.

Hibbins has batted away any talk of counting irregularity, said to be surrounding a bundle of 16 Greens primary votes. “My understanding is that they thought they had them on the weekend but when they checked them yesterday they found that they weren’t clear so they didn’t include them in the final count.”

The Victorian Electoral Commission began recounting at 10am today in Prahran, with a result expected later today or early tomorrow.

Newton-Brown “did not want to commentate on his own demise”, but it is unlikely this is the end of Clem.

He fought a tough fight for the fickle seat and commanded a strong primary vote from the northern end of the electorate in South Yarra and Toorak. His campaign promised to build a high school in Prahran, which would fulfil a gap in state-funded education there, and also played up the former government’s role in expunging old convictions for gay sex — an ongoing theme in the campaign was to highlight LGBTIQ successes.

Newton-Brown was considered a possible future leader of the Liberal Party and had his hat in the ring as a potential deputy leader in the party room leadership vote, held last week. In parting, he used Facebook to call on Prahran voters to “make sure your new Member and the Andrews Government lives up to the community expectations of a world class secondary school co-located with the Deaf School on St Kilda Rd”. One of his followers, Peter de Groot, posted in reply: “Highlight is yelling at East-West protesters go get a job while going to the Regent, the Pride Marches under the Liberal Banner and the various dinners.”

Strangio says if the Greens do hold onto Prahran, their battle in the seat is far from over: “I think to hold Prahran it will be more complex and tricky.”