Libya's prime minister has promised a Cabinet reshuffle and praised militias by saying they are "revolutionaries" in an apparent bid to defuse tension after the armed groups ended a more than 10-day siege of government institutions.

The militias had surrounded buildings to pressure the central government to pass a law excluding Moammar Gadhafi-era officials from public office.

The law was passed over the weekend, but the militias had maintained the siege as they demanded the dismissal of Premier Ali Zidan himself.

Militias, including former rebels who toppled Gadhafi in 2011, have refused to lay down their arms.

Zidan, who has challenged the groups since assuming his post in November, backed down at a press conference Wednesday by saying "we have no militias, we have revolutionaries."