Updated

Rogue police officers in Papua New Guinea blockaded Parliament for several hours on Friday, a day after Prime Minister Peter O'Neill's government leveled sedition charges against the country's chief justice.

Tensions between O'Neill and his opponents have been heightened since Monday, when the Supreme Court ruled that his ousted predecessor, Sir Michael Somare, is the rightful ruler of the South Pacific island nation.

The situation outside Parliament House became especially tense when about 40 heavily armed police officers arrived at a staging area around the corner from the group of about 30 unarmed rogue officers. But the armed force left without incident after about 20 minutes, and the blockade was lifted about 30 minutes later.

Assistant Police Commissioner Francis Tokura said he negotiated a peaceful end to the confrontation.

"The last thing we wanted was to see bloodshed among our own men," Tokura said. "We are very grateful we were able to sort it without bloodshed."

A senior police source who declined to be named told the Australian Associated Press that the police who blockaded Parliament were not acting on the police commissioner's orders, and that he did not know whose orders they were acting on.

O'Neill had been trying all week to reconvene Parliament to consider the Supreme Court ruling but had been unable to achieve a quorum because most lawmakers are away campaigning. It was not immediately clear if Parliament had sat late Friday.

O'Neill's government alleges the court is biased and is trying to interfere with the upcoming elections, which begin June 23 and last for two weeks.

On Thursday, Deputy Prime Minister Belden Namah led officers into the Supreme Court to arrest of Chief Justice Sir Salamo Injia, one of three judges who affirmed an earlier ruling that Somare is the nation's legitimate prime minister.

Injia appeared in a court on Friday charged with sedition. He did not enter a plea and was freed on bail. Hearing of the case was adjourned to July 25. He faces a potential maximum sentence three years in prison.

Parliament replaced Somare with O'Neill in August while Somare was getting medical treatment abroad. The Supreme Court sided with Somare in December. In January, a supporter of Somare tried to take over the military with a small group of soldiers and ordered O'Neill to step down, but the effort failed and he was charged with mutiny.

Somare issued a statement Friday saying he has begun campaigning on behalf of his National Alliance party. However, it is unclear whether the 76-year-old will stand for re-election.