SYDNEY (Reuters) - Vote counting has begun in Papua New Guinea (PNG), signalling an end to a general election marred by poor organisation and opposition accusations of electoral roll irregularities, which experts said could ignite protests.

Voting was set to finish across the country on Saturday, but with a large number of people unable to cast ballots due to out-of-date electoral rolls and logistical problems, ballot boxes were still open in some provinces on Sunday.

Tension in PNG has been high for months amid a groundswell of unrest following allegations of corruption against Prime Minister Peter O'Neill.

The frustration among voters unable to cast ballots could trigger new unrest, analysts said.

"There's always some degree of violence and malfeasance in a PNG election, however no one expected the electoral roll to be this bad," Jonathan Pryke, director of the Lowy Institute of Policy's Melanesia Unit, told Reuters.

In June 2016, a student protest turned violent when police opened fire, injuring dozens.

International observers said the use of an electoral roll from 2012 polls meant many people, in highland regions in particular, were denied the chance to vote.

Sam Basil, leader of the junior opposition Pangu Party, told Reuters 9,000 voters in his constituency of Bulolo, on the north coast of the main island, had been unable to cast ballots because of irregularities.

He said polling was expected to finish across PNG on Monday.

Observers expect a tight race between O'Neil's party and that of his main rival, former Treasurer Patrick Pruaitch.

Whoever wins faces a difficult economic outlook with a budget deficit that has ballooned in recent years amid a slump in oil and gas prices. A 2016 drought crippled farming and brought production at its largest copper mine to a halt by cutting off river transport and therefore fuel supplies.

Moody's downgraded PNG's credit rating to B2 in April last year, reflecting balance of payments pressures that have been compounded by the slump in global commodity prices.

Despite its mineral wealth, which includes Exxon Mobil's $20 billion LNG plant, most of the country's nearly eight million people live at subsistence level on islands, atolls and in remote mountain village.

(Reporting by Ben Cooper; Editing by Robert Birsel)