Lawmakers passed a vote of no confidence on the prime minister after he failed to stop an illegal shipment of oil by rebels.
The Libyan parliament has dismissed Prime Minister Ali Zeidan for failing to stop rebels from exporting the country’s oil.
The lawmakers passed a vote of no confidence on Mr. Zeidan after a North Korean-flagged tanker laden with oil from a rebel-held port, broke through a naval blockade.
Libya had earlier threatened to bomb the vessel. It was intercepted by the navy on Sunday, but managed to slip into international waters a day later.
Defence Minister Abdullah al-Thinni was named interim prime minister on Tuesday.
The vessel was the first to have loaded oil from the rebel-held eastern Libya, where separatists are seeking greater control of resources since August.
They are also seeking autonomy for eastern Libya.
The oil tanker was reported to have taken on at least 234,000 barrels of crude oil at the Sidra terminal.
Previous attempts to remove Mr. Zeidan had failed to win the required majority of 120 of the assembly’s 194 members.
The former prime minister had been accused repeatedly for its failure to disarm militias which formed their own strongholds after the ouster 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.