Forces loyal to deposed Papua New Guinea Prime Minister Sir Michael Somare raided the country's main army barracks on Thursday, installing a new military commander and demanding Somare be reinstated as leader of the resource-rich nation.

Papua New Guinea has for months been gripped in a political deadlock, with incumbent Prime Minister Peter O'Neill taking office in August after Somare was ruled ineligible as a member of parliament due to illness and absence from the legislature.

In the early hours of Thursday, up to 20 soldiers raided the main army barracks, seized their chief commander and placed him under house arrest in an action dubbed Operation Protect the Constitution.

I call on the disciplinary forces to ensure public safety by exercising restraint at all times, Somare said in a statement announcing he had appointed a new defence force chief and again declaring he was the legitimate prime minister.

Residents of Port Moresby said the dusty port capital was quiet although tense with roadblocks around the main army barracks.

PNG has a history of political and military unrest. An army mutiny in 1997 overthrew the government after it employed mercenaries to try to end a long-running secessionist rebellion on the island of Bougainville, home to a big copper mine.

The Supreme Court in December ordered Somare reinsated but O'Neill rejected the ruling, with parliament again voting him prime minister, leaving two competing leaders.

Col Yaura Sasa has been appointed by the legitimate government as the New Commander of the Defence and it is the duty of discipline forces to protect the Constitution, Somare said in an email sent to Reuters by his daughter, Betha Somare.

Should anyone be aggrieved they should go to the same court that has restored the Somare government.

Sasa called for Somare's reinstatement and set a seven-day deadline for lawmakers to resolve the constitutional crisis, warning he may be forced to take necessary actions.

I am calling on both Sir Michael Somare and Mr Peter O'Neill to recall the Parliament to sort out the current political situation, he said.

Sasa sat alone at a desk when he held his news conference, with no other soldiers present.

A few hours later, O'Neill's deputy prime minister, Belden Namah, said some 15 Sasa supporters had been arrested and called on the mutineers to surrender to police, warning that treason carries a death penalty.

For Somare to use rogue policemen and rogue soldiers to pursue his own greed and selfishness is really a sad situation for a person who claims to be the father of the nation ... you have lost sanity, Namah told a news conference in Port Moresby.

CRISIS JEOPARDISES INVESTMENT

The crisis has jeopardised PNG's prospects as an investment destination just as U.S. oil giant ExxonMobil develops a $15.7 billion (10.0 billion pounds) liquefied natural gas plant, the country's biggest-ever resource project.

Exxon spokeswoman Rebecca Arnold said the company had been monitoring developments.

At this stage, it's business as usual, she said.

PNG, a country of 6.5 million people, has vast mineral wealth although 85 percent of its people live a subsistence village life. Port Moresby is plagued by lawless and often violent raskal gangs of youths.

The military is careful to draw its membership evenly from regions and clans, ensuring no single ethnic group can take control or command enough support for a coup.

Reporters said it was unclear how much support the rebels had inside the military, believing they may be only a small band, with most soldiers either backing O'Neill or dissatisfied with both O'Neill and Somare.

Neighbouring Australia called for a restoration in the line of command in the defence forces.

We urge that the situation be resolved as soon as possible, and that the Papua New Guinea Defence Force chain of command is restored, the Foreign Ministry said in a statement.

Authorities cancelled flights from the capital to other towns in the mountainous South Pacific island.

There is no place for the military in a PNG situation, Australia's Resources Minister Martin Ferguson, who is acting foreign minister, said on Australian TV.

The sooner we return to the normal constitutional political process, the better for Papua New Guinea, Ferguson said, adding that Australia accepted Peter O'Neill as the prime minister under the country's constitution.

Last month, O'Neill declared victory in the standoff against Somare after the governor general named him the legitimate head of government. The country's civil service, police and army leaders also backed O'Neill.

For many Papua New Guineans, the crisis is a contest between the old political guard of Somare -- known as The Chief who led the country to independence -- and O'Neill's administration, which is seen offering a fresh, more open alternative.

Elections are due in June.

(Additional reporting by Mark Bendeich, Lincoln Feast, James Grubel and Chris McCall; Editing by Robert Birsel)