The new leader of Welsh Labour – and the person set to become Wales’ next first minister – will be announced later.
Three candidates – Eluned Morgan, Vaughan Gething and Mark Drakeford – are hoping to replace Carwyn Jones, who stands down next week.
Labour officials will reveal the election result in Cardiff on Thursday.
It follows a year in Welsh politics marked by the death of former minister Carl Sargeant.
Mr Sargeant was found dead in November 2017, days after the first minister sacked him from his cabinet over allegations of inappropriate behaviour towards women.
Mr Jones said he had been through the “darkest of times” when he announced his intention to quit in April.
About 175,000 people – about 25,000 party members and 150,000 members of affiliated groups including trade unions – have been able to take part in the Labour poll, which closed last Monday.
The winner will be Welsh Labour leader-elect until Carwyn Jones resigns next week, and will become the next first minister after confirmation by the assembly on Wednesday.
They will lead the Welsh Government, which has responsibility for health, education, local government, transport and some taxes in Wales, among other areas of policy.
At the conclusion of the contest, all four party groups represented in the Welsh assembly – including the Welsh Conservatives, Plaid Cymru and UKIP – will have changed leader during 2018.
By Felicity Evans, BBC Wales political editor
This has felt like a long leadership contest.
Carwyn Jones’s announcement of his departure was precipitated by the death of his former cabinet minister.
By now, Carwyn Jones had hoped the trilogy of inquiries he set in motion in the wake of Mr Sargeant’s death would have been completed. In fact the most important, into how he handled the sacking, is yet to start.
The winner of today’s contest will need to heal Welsh Labour of the divisions that emerged from the tragedy of Mr Sargeant’s death – divisions which can only have been deepened by last week’s inquest, which itself is yet to conclude.
And if that wasn’t enough, the winner takes over at a time of unprecedented change. They will have new powers over income tax. They will face an imminent Brexit and the chaos of the power struggle at Westminster. And then there’s the M4 relief road.
No pressure then.
Who are the candidates?
Mark Drakeford had been considered the front-runner in the contest, having won nominations from 16 assembly members.
Born in Carmarthen, the finance secretary has been a key part of Labour’s government in Cardiff for years – serving as a special advisor under the previous first minister Rhodri Morgan before becoming an AM in 2011, and a cabinet minister in 2013.
An academic and a probation officer before full-time politics, the republican Cardiff West AM has the support of the Welsh version of the Jeremy Corbyn-supporting Labour faction Momentum – known as Welsh Labour Grassroots.
Thought to be a sceptic on the proposed M4 Relief Road upgrade, his pledges include extending the smoking ban to outdoor areas of cafes and restaurants.
Cardiff South and Penarth AM Vaughan Gething was the second candidate to get enough support to run.
Less likely to see eye-to-eye with the politics of UK leader Jeremy Corbyn, at 44 the health secretary is the youngest candidate.
Mr Gething, who was born in Zambia, has been a vocally critic of Mr Drakeford throughout the campaign, accusing him of having an “awful” tone on the subject of Brexit.
The candidate said Mr Drakeford was “reckless” for invoking the memory of nuclear power plant disasters in a conversation about plans for a new Wylfa power plant.
He has vowed to ensure school children that receive free school meals are fed outside of school terms, and pay for tuition fees for children leaving care.
Eluned Morgan squeezed on to the ballot after a row about a lack of women candidates, thanks to a nomination from Carwyn Jones.
The Cardiff-born vicar’s daughter previously served as an MEP after she was elected to the European Parliament at the age of 27, in 1999 – she was the youngest at the time.
Ms Morgan, who serves as a regional assembly member for Mid and West Wales, has promised free fitness trackers for secondary school children, supports the idea of a Universal Basic Income, and has said unemployed people could be given £1,000 to start their own business if she becomes first minister.
Ms Morgan is a baroness – having represented Labour on the front bench in the House of Lords – and has vowed to relinquish the title if she wins.
What happens next week?
Carwyn Jones’s final First Minister’s Questions will to take place in the assembly on Tuesday. He will tender his resignation to the Queen via e-mail later that afternoon.
That comes into effect whenever the palace replies. It is not known how quickly Her Majesty will reply.
It is planned that the winner of the Welsh Labour leadership contest will be nominated on Wednesday.
Both Plaid Cymru and the Welsh Conservatives will back their own leaders to be the next first minister – but the efforts are highly unlikely to succeed.
The Labour-led Welsh Government has an assembly majority, thanks to the support of Liberal Democrat Kirsty Williams and independent AM Lord Elis-Thomas.