Papua New Guinea was plunged into political deadlock after the parliamentary speaker refused to recognise a controversial court ruling reinstating Sir Michael Somare as prime minister. As the elderly Somare was due to be sworn in later Tuesday, Australia urged calm, saying it was "deeply concerned" over the tense standoff in a country with a history of political intrigue and corruption. Somare, 75, was reinstated as the Pacific island nation's leader late Monday when the Supreme Court ruled the election of Peter O'Neill to the post by fellow lawmakers in August was unconstitutional. But Speaker Jeffery Nape said during an emergency sitting of parliament Tuesday that he would only recognise the government of O'Neill, a former finance minister in the Somare administration. Somare was ousted by a majority of lawmakers after he spent months in Singapore recuperating from heart surgery. His long absence from parliament prompted lawmakers to declare his seat vacant, seemingly ending his dominance over political life in the impoverished country as it stands on the threshold of a resources boom. But in a narrow 3-2 decision, the Supreme Court found there was no vacancy in the office of prime minister, and rendered illegal the August decision to hand the office to O'Neill. "The judiciary has once again upheld our constitution," Somare, who has led the country for almost half of its 36 years of independence, said after the judgement. "My government followed process and waited for the appropriate authority, the judiciary, to make its judgement." But Nape insisted Tuesday that O'Neill was the legitimate leader. "The law is very clear," he said according to Australian Associated Press. "The decision by the speaker of parliament on August 2 that there was a vacancy (in the prime ministership) on August 2 was not unlawful." Local journalist Belinda Kora told AFP the situation in the capital Port Moresby was tense, with police firing shots to the air outside the residence of the governor-general late Monday. The capital had been bracing for demonstrations in reaction to the decision and dozens of heavily armed police had blockaded the area after the Supreme Court order, although no unrest was reported. "A lot of people are confused, they don't know what's happened, who's the prime minister," Kora said via telephone. Australian Foreign Minister Kevin Rudd called for calm, saying "violence would help nobody". "We are deeply concerned about the situation," he told the ABC, adding that Canberra was in touch with all parties and employing "quiet diplomacy". "Obviously there are heightened political intentions within Port Moresby with two, as it were, alternative prime ministers. This is unknown terrain in Papua New Guinea. "We are urging calm on the part of all parties," he said. Often murky and rife with intrigues and corruption scandals, the political scene of the poverty-stricken but resource-rich country has been dominated by Somare for decades. His family announced his resignation in June without consulting him while he was ill, but when he recovered Somare insisted he was still leader, saying there had "never been any vacancy in the position of prime minister". Somare became his country's first leader on independence in 1975. He lost office in a vote of no confidence in 1980, but he was re-elected and again served as prime minister from 1982 to 1985, and again from 2002.