Image copyright Other Image caption Both Sir Michael Somare (L) and Peter O'Neill claim the top job in Papua New Guinea

Papua New Guinea's parliament has elected Peter O'Neill prime minister, amid a lengthy tussle for the top job.

The chief justice ruled last week that Sir Michael Somare was still the country's legitimate leader.

But the deputy speaker then said Mr Somare was disqualified from the post because he had missed three consecutive sessions of parliament.

Mr O'Neill was elected unopposed by lawmakers but his swearing-in was then suspended.

The acting governor-general suspended the ceremony, saying he had to "study the documents".

'Confusing'

PNG has been mired in political deadlock since last year, with two men claiming the role of prime minister.

Parliament first elected Mr O'Neill prime minister last year after declaring the post vacant while Mr Somare, the 76-year-old long-time leader, was out of the country receiving medical treatment.

But the Supreme Court said the move was illegal - a decision it restated last week. Since then the chief justice has been charged with sedition and a group of police briefly blockaded parliament.

Mr O'Neill, who is effectively running the country, was elected unopposed on Tuesday after the prime minister post was again declared vacant. Mr Somare was not in Port Moresby for the vote, ABC News reported.

But acting Governor-General Jeffery Nape put the swearing-in ceremony on hold. "The swearing in is suspended," he said.

General elections are due to be held in the country in June.

Both Australia and the Commonwealth have called for restraint in Papua New Guinea amid the leadership tensions.

Australian Foreign Minister Bob Carr called the recent turn of events "confusing".