The decision was handed down in a 3-2 ruling on Monday hours after O'Neill's government passed a series of retrospective laws legalizing its decision to dump Somare from office while he was in Singapore recovering from a heart condition.
The court found that there was no vacancy in the office of prime minister on Aug. 2 and that the vote of 70 to 24 lawmakers that elected O'Neill was illegal.
The court also said that 75-year-old Somare was still a member of parliament, overturning a mid-August decision by Speaker Jeffery Nape to unseat him.
Somare had been in Singapore for five months between late March and Sept. 6, when he returned to parliament after undergoing three heart operations. He is expected to be sworn in as prime minister on Tuesday.
Australian Foreign Minister Kevin said he was "deeply concerned" by political developments in the former Australian colony.
"There are heightened political tensions within Port Moresby with, as it were, two alternative prime ministers," Rudd told Australian Broadcasting Corp. radio on Tuesday.
More Nation & World Headlines
Police say person of interest in custody in Memphis officer killing 12:35 p.m. Obama to require steeper emissions cuts from U.S. power plants 3:10 p.m. Zimbabwe alleges 2nd American illegally hunted lion 2:13 p.m. Who will be the new face of the GOP? Malaysia seeks help in finding more possible MH370 debris 12:28 p.m. New bug-inspired robot can jump off of water Hitchhiking robot destroyed in Philadelphia U.S., Russia ease travel rules for Bering Strait natives
Our new comment system is not supported in IE 7. Please upgrade your browser here.