France, Britain and Spain have sent ambassadors to Tripoli as the international community tries to show solidarity with the UN-brokered unity government for Libya.

It is the diplomats’ first return since all envoys fled the country in 2014 during the chaotic civil war. Most of the foreign embassies closed for security reasons as Tripoli became the focus of heavy clashes between rival militias.

The three diplomats – the French ambassador, Antoine Sivan, the British envoy, Peter Millet, and Spain’s José Antonio Bordallo – were to meet deputies of the prime minister-designate, Fayez al-Sarraj, at a heavily guarded naval base in Tripoli, which is acting as the temporary headquarters for the putative government.

Earlier this week, the Italian foreign minister, Paolo Gentiloni, visited Tripoli and announced that talks were under way to reopen embassies.

The west is hoping the new government will unify Libyans and help the country combat the local affiliate of the Islamic State terror group. The UN-recognised parliament is expected to meet on Monday for a vital vote of confidence in the new administration, the next step in asserting its authority in the country.

Sarraj’s chief rival, the president of the Tobruk parliament, Aqaliah Saleh, has claimed the government was a tool of the United Nations’ special envoy to Libya, Martin Kobler.

In the short term, the west is trying to show that its political support will bring tangible rewards for the government, including humanitarian aid.

But it is also hoping the return of order will help create a Libyan military capable of combating Islamic State in the north of the country and reduce the incentive of people to migrate to Europe from north Africa. An EU naval mission wants permission to operate in Libyan territorial waters, making it easier to return refugees to Libya.

Donald Tusk, the European council president, said 4,000 people were rescued from the Mediterranean between Libya and Sicily on Monday and Tuesday.

He said: “Convenient and easy solutions are hard to find in politics and in this case they are virtually impossible.”

Meanwhile, a military adviser for the UN said most Europe-bound migrants had passed through the Balkans in 2015 between Turkey and Germany, but this was now changing.

“In Libya there are a million potential migrants,” Gen Paolo Serra, a military adviser for Kobler, told a committee at the Italian parliament.

Elizabeth Collett, the director of the Migration Policy Institute in Brussels, said none of the drives to reduce migration to Europe were slowing.