Updated

Papua New Guinea Prime Minister Peter O'Neill has been re-elected as leader of the South Pacific island nation.

The nation's parliament elected O'Neill to a second five-year term on Wednesday by a vote of 60 to 46, after his People's National Congress party won enough seats to form a coalition government with other minor parties.

Papua New Guinea is considered one of the world's most corrupt nations, and polling there is a complicated process monitored by police and soldiers. Voting began in June, and counting took weeks. Along the way, violent protests broke out over allegations of vote-counting fraud and two police officers were killed.

The election's legality has already being challenged in court, and counting was still underway in several electorates even as O'Neill was being sworn in.