After 16 long years in the political wilderness, the Liberal party has claimed victory in South Australia after one of the most unusual election campaigns in living memory.

At a packed Hackney hotel on the edge of his seat of Dunstan – which he won handsomely – the incoming Liberal premier, Steven Marshall, entered the room to squeals of delight and speakers blasting out The Man by the Killers.

“A massive thank you to the people of South Australia who have put their trust, their faith in me and the Liberal team for a new dawn, a new dawn for South Australia!” he said.

Marshall won on a platform strongly grounded in business-friendly plans including deregulating shop trading hours and cuts to payroll tax, land tax and the emergency services levy.

He paid special tribute to Vincent Tarzia, earlier introduced to the room as the “lion of Hartley”, for defeating the SA Best leader, Nick Xenophon, in the eastern suburbs seat. Marshall might have been speaking about himself when describing how Tarzia would have reacted to the news Xenophon would be returning to state politics.

“Most people at that point of time would have thought this is not going to happen, I’m going to throw in the towel,” he said.

Marshall had banked it all on victory, pledging to quit if he lost and ruling out a deal with Nick Xenophon’s SA Best to form government. The result was also a profound relief for the party at large – after winning the popular vote in three of the past four elections, only to lose them all.

It was a result that the Liberals felt they they’d been robbed of three times over. Their election-night traumas combined with the uncertainty of Xenophon’s return to state politics with SA Best, who had a relatively disappointing showing, left even the most confident party faithful holding their breath until the result was beyond all doubt.

Labor’s leader Jay Weatherill, as he promised earlier in the day, was philosophical about the result, acknowledging the challenge of winning another election after so long in power.

“I’m so sorry we couldn’t bring home another one to you,” he said. “I feel like a horse that’s won four Melbourne Cups and the handicap has just been put up.”

Weatherill expressed pride in the achievements of Labor’s long stint in power, which began with the election of the Rann government in 2002, before Weatherill took power in 2011.

He highlighted in particular the rollout of one of some of the most ambitious renewable energy infrastructure in the world, with projects constructed or under way including the biggest solar thermal tower in the world, and the two biggest battery storage systems globally. Aside from the “time for change” imperative, Labor was up against it in newspaper coverage, with the Adelaide Advertiser and the Australian both endorsing Marshall.

As it stood at 10.30pm on Saturday night, the Liberals were in front in 25 seats despite a swing against them of 6.9% and a primary vote of 37.8%, an oddity explained by the arrival of SA Best and a redrawing of electoral boundaries in 2016 that actually meant Labor had to win seats to retain government.

Labor looked set to win 18 on a primary vote of 33%, and is still a chance in Adelaide, King and Newland. Three independents were on the verge of victory, and SA Best was not in front in any seats although remained a chance in Heysen. The party secured a vote of 13.7%, well short of the 32% Newspoll projected at its height last December.

Xenophon made a unusually early concession speech of sorts at 8pm at the SA Best function at Palace Nova cinemas in the heart of Adelaide.

On a night when SA Best were expected to get anywhere between one and four seats, he framed the result as a victory against the duopoly of Liberal and Labor because of a number of second-place finishes, and a platform to build from in the future. “This is not the beginning of the end, it’s actually the end of the beginning,” he said.

“We’ll have a presence in the state parliament and we’ll build on that presence and build on it, so that every day, for the next four years, we’ll hold the government, the next government of South Australia, to account. We’ll hold the opposition to account, we’ll make the parliament a workhorse, not the rocking horse it is now.”

The seat of Hartley was a microcosm of the challenges facing the SA Best campaign, with Labor, Liberal, Greens and Australian Conservatives candidates all preferencing against Xenophon, the pokies lobby running a concerted campaign on the ground against him, and the SA Best party leader too busy elsewhere to spend much time meeting voters.

The Liberals poured resources into beating Xenophon personally, hoping that defeating the SA Best leader would leave any candidates who did get elected rudderless.

In the Legislative Council, it looked on election night that four Liberals, four Labor and two SA Best candidates would be elected. Of the one seat remaining, it appeared that the Greens MLC Tammy Franks would retain her seat ahead of the Australian Conservatives’ Robert Brokenshire.

In an election calling on a record 1.2 million South Australian registered voters, sausages sizzled outside polling booths housed in schools, town halls and churches across the state.

The final tally will be further delayed by the record 215,000 early votes cast, which the Electoral Commission will only begin counting on Monday in a process that could take weeks.

Marshall will be hoping for further good news from those ballots, having himself voted early in an attempt to encourage the public to do the same while the report on the Oakden aged-care home abuse scandal was still in the news cycle.