Pope Francis has appealed to European leaders to show "concrete solidarity" and allow 49 migrants aboard two ships in the Mediterranean to land.

Issuing a "heartfelt appeal" in a public address in the Vatican, the Pope said the migrants needed "a safe port".

Both Italy and Malta have refused to allow the two ships to land.

Malta's Prime Minister Joseph Muscat said it could set a "precedent", while Italy's Deputy Prime Minister Luigi Di Maio called on Malta to "do its part".

"I make a heartfelt appeal to European leaders to show concrete solidarity for these people," the Pope told about 60,000 people in the Vatican's St Peter's Square in an Epiphany feast day address.

The Dutch-registered vessel Sea-Watch 3, operated by a German humanitarian group, picked up 32 of the migrants off Libya on 22 December while Sea-Eye - a second ship run by a different German charity - rescued another 17 people on 29 December.

Malta has allowed the two ships to enter its waters for supplies and to shelter from bad weather, but refused to let them dock.

"This is an issue that might set a precedent and we should be vigilant about it," Prime Minster Muscat said before the Pope's appeal, accusing critics of acting as "the Christmas saint" while refusing to take in the migrants themselves.

Italy's Deputy Prime Minister Di Maio meanwhile said Italy had been taking in migrants for years and the time had come for Malta to take in some ships.

The country's new populist government has cracked down on immigration, passing a decree to make it easier to deport migrants and strip them of Italian citizenship in September.

Italy has refused private humanitarian ships to dock in the past, including the Doctors Without Borders vessel Aquarius.

The country's Interior Minister Matteo Salvini, of the right-wing League party, has demanded more help from other EU countries to tackle the issue.

Charities and UN agencies have called on European leaders to take in the vessels as they wait in the Mediterranean.

The UN's refugee agency has tweeted that it is concerned for the safety of those who try dangerous sea crossings when there are "limited" legal routes for them to take.