TRIPOLI (Reuters) -- Libya's new prime minister, Ahmed Maiteeq, held his first Cabinet meeting at his office Monday after police forces helped him take over the building.

The North African country is struggling with turmoil and a political crisis as outgoing premier Abdullah al-Thinni has refused to hand over power to Maiteeq, who was elected by parliament in a chaotic vote last month.

Thinni had resigned in April but has said he received conflicting orders from Libya's divided parliament over the legitimacy of Maiteeq's election and would continue in his post until an assembly called the General National Congress resolved the dispute.

Maiteeq arrived at the prime minister's office late in the evening escorted by police cars, witnesses said. Thinni had moved earlier to another government building, his spokesman said.

In a brief statement after the Cabinet meeting, Maiteeq denounced clashes between militant Islamists and army forces that had erupted in Benghazi, killing around 20 people.

Standing behind his Cabinet, the businessman vowed to make improving security and fighting terrorism a top priority.

There was no immediate comment from Thinni after Maiteeq's statement was read live on television. The Cabinet's tenure might be short-lived as Libya is preparing for elections later this month.

First Deputy Parliamentary Speaker Ezzedin al-Awam told Reuters Monday that Thinni had told him he had not handed over officially the prime minister's office to Maiteeq.

Parliament is at the heart of a growing confrontation among rival political parties and brigades of former rebels who refuse to disarm and have allied themselves loosely on competing sides of a split congress.

Four decades of authoritarian rule by Moammar Gadhafi and three years of unrest since his downfall have left Libya with few institutions and no real army to impose state authority on former fighters and Islamist militants who often use their military muscle to make demands.

Those rivalries have come closer to open confrontation since last month after Khalifa Hifter, a renegade former general, began a self-declared campaign with renegade forces to purge Islamist militants he says the government has failed to challenge.

Maiteeq, a businessman backed by independents and Islamist lawmakers, was appointed by GNC members after a chaotic vote contested by rival factions as illegitimate.