The former Libyan prime minister, Ali Zeidan, has defied a travel ban and fled the country hours after parliament removed him from office in a no-confidence vote.

Zeidan was in Malta for two hours late on Tuesday on a refuelling stop before going to "another European country", the island's prime minister, Joseph Muscat, said.

The Muscat told state-owned television channel, TVM, that he spoke briefly to Zeidan, who was banned from travelling abroad because of his suspected involvement in the embezzlement of public funds.

Zeidan spent many years in exile in Germany and it is believed he may head there.

Libya's parliament voted Zeidan out of office on Tuesday after rebels humiliated the government by loading crude on a tanker that fled from naval forces.

State prosecutor Abdel-Qader Radwan said in Tripoli he had banned Zeidan from travelling abroad because he faced an investigation over the alleged financial irregularities.

The no-confidence motion against Zeidan was approved by 124 of the 194 members of the parliament, four more than the majority required, MPs said.

MP Suleiman al-Zubi told the AFP news agency that the defence minister, Abdullah al-Thanni, was named as an interim replacement for the two weeks the assembly now has to agree on a permanent replacement.

Parliament will support Thinni and not obstruct his work, its head Nuri Ali Abu Sahmain told the assembly during a session broadcast by state television after the caretaker prime minister took his oath.

Previous attempts to bring down Zeidan had failed to win the required majority.

Zeidan's government had been repeatedly criticised for its failure to disarm militias which have carved out their own fiefdoms since the NATO-backed uprising that ended the 42-year rule of Muammar Gaddafi in 2011.

The prime minister was himself briefly abducted by an armed group in the heart of the capital, Tripoli, last October.

Rebels demanding a bigger share of oil revenue and political autonomy in the east seized three ports last summer and partly control a fourth.

Western powers fear the OPEC member state could break apart, with the government struggling to rein in the armed militias and tribesmen who helped topple Muammar Gaddafi in 2011.