Libya's prime minister says unless his country finds political stability, more than 800,000 migrants could make their way into Europe - creating even more of a crisis.

In recent months, there has been frantic fighting on the perimeter of the city and thousands of civilians have abandoned their homes to escape the violence.

IN LIBYA A ROGUES' GALLARY OF MILITIAS PREPARE FOR WAR

Fighters loyal to Fayez al-Sarraj have been trying to stop an advancing army commanded by Khalifa Haftar, a warlord who served under Libya's former Colonel Muammar Qaddafi. Haftar launched a surprise offensive to retake Tripoli on April 5.

In this Sept. 21, 2018 file photo, a fighter under the UN-backed government prepares his gun during clashes in southern Tripoli, Libya. 

In this Sept. 21, 2018 file photo, a fighter under the UN-backed government prepares his gun during clashes in southern Tripoli, Libya.  (AP)

Sarraj runs the government in Tripoli, the authority west of Libya, which is recognized by the United Nations, while Haftar has set up a rival administration in the east from his base in Benghazi.

Haftar's forces have been accused of launching bombs and rocket attacks on schools, homes and offices. The general himself has declared that he's clearing the capital of "terrorists."

It's a threat Sarraj pushes back strongly on and says the bombings are a thinly-disguised military power grab.

In this Aug. 14, 2017 file photo, Libyan militia commander General Khalifa Hafter meets with Russian Foreign Minister Sergei Lavrov in Moscow, Russia.

In this Aug. 14, 2017 file photo, Libyan militia commander General Khalifa Hafter meets with Russian Foreign Minister Sergei Lavrov in Moscow, Russia. (AP Photo/Ivan Sekretarev)

"Has Tripoli all of a sudden become a terrorist city?" he told Sky News. "And are all its residents now terrorists? Are Abu Salim residents who were bombed yesterday now terrorists? Or those living in Ain Zara, or Sawani? Are all of these terrorists? Or are these crimes against humanity? Isn't it time now to call it as it is?"

IVANKA TRUMP EYES LAWS, CONDITIONS THAT DETER AFRICAN WOMEN

Sarraj said that while the ultimate goal is peace, he added: "If we are forced to fight, we are up for the fight."

Sarraj, an architect who got into politics during his 50s, is calling on the international community to "pressurize these forces and call it by its name and pressurize them to go back where they came from."

This April 3, 2019 photo shows migrants on a rubber dinghy rescued by the Sea-Eye rescue ship in the waters off Libya. The humanitarian ship Sea-Eye with 64 rescued migrants aboard was stuck at sea on Thursday as Italy and Malta refuse it safe harbor as their refusal set the stage for another Mediterranean standoff that can only be resolved if European governments agree to accept the asylum-seekers.

This April 3, 2019 photo shows migrants on a rubber dinghy rescued by the Sea-Eye rescue ship in the waters off Libya. The humanitarian ship Sea-Eye with 64 rescued migrants aboard was stuck at sea on Thursday as Italy and Malta refuse it safe harbor as their refusal set the stage for another Mediterranean standoff that can only be resolved if European governments agree to accept the asylum-seekers. (Fabian Heinz/Sea-eye.org via AP)

The prime minister also wants the fighters who are carrying out the attacks on civilians to be tried for crimes against humanity and for Heftar to be held accountable.

CLICK HERE FOR THE FOX NEWS APP

Sarraj also warned of a migrant crisis if the international community doesn't step in and help.

"What's going to happen with this security breakdown is that 800,000 illegal migrants on Libyan ground will have to leave Libya and will cross the sea towards Europe," he said. "Amongst these 800,000 there are terrorists and criminals. This will be disastrous".