Updated

Germany is pledging an additional 3.5 million euros ($3.9 million) to help improve conditions for refugees in Libya.

On an unannounced visit to Tripoli on Thursday, Foreign Minister Sigmar Gabriel said many migrants in Libya "are in a desperate situation." The money, to be paid by 2018, comes in response to a call from the UN refugee agency, UNHCR.

According to a transcript provided by the Foreign Ministry, Gabriel said the money will be in addition to Germany paying the "lion's share" of a 100-million-euro regional program run by the International Organization for Migration.

It's to be used to improve living conditions at refugee centers.

Many refugees fleeing the Mideast and Africa transit through Libya before attempting the perilous journey across the Mediterranean to Europe.