The United Nations' refugee agency has said a new Italian law authorising massive fines against the owners of private rescue ships could endanger the lives of migrants attempting to cross the Mediterranean Sea.

The so-called "security decree" drafted by Italy's right-wing interior minister Matteo Salvini and given final parliamentary approval on Monday raised the maximum fine for entering Italian waters without permission to one million euro (£919,000) from a previous 50,000 euro (£46,000).

The law also allows for the arrest of captains who ignore orders to stay out of Italian ports and the immediate seizure of their boats by Italian naval authorities.

READ MORE: Migrants in Italy boat dispute disembark despite ban

The UNHCR agency said non-governmental organisations operating rescue ships play "an invaluable role" in saving lives and "the commitment and humanity that motivates their activities should not be criminalised or stigmatised".

Italy's law "could deter or impede sea rescue activities by private vessels at a time when European states have largely withdrawn from rescue efforts" in the Mediterranean, the UNHCR added.

After the Italian senate voted 160-57 with 21 abstentions in favour of his decree, Mr Salvini called the move "a step forward towards a more secure Italy", and thanked the Italian people and "the blessed Virgin Mary", according to Italian news agency ANSA.

The European Union's executive commission said it is analysing the legislation to see if it is compatible with EU laws.

READ MORE: Rightist Italian group falsely claims 'pact' with SNP

Since taking office last year in a populist coalition government, Mr Salvini has made keeping migrants from reaching Italy and pressuring other European countries to take responsibility for new arrivals his top priority.

He banned ships on humanitarian rescue missions from bringing migrants into the country's ports, arguing that their presence in the Mediterranean encouraged smugglers to launch unseaworthy boats from northern Africa.

The captains of at least two aid group ships have defied the ban and taken migrants to Italy's southernmost Lampedusa island - one on June 29 and the other on July 6.

The German captain of the first ship was arrested after docking with 40 migrants on board and is under investigation in Italy for allegedly aiding illegal immigration. The second ship, operated by an Italian aid group, docked without incident carrying 46 migrant passengers.

The UN's International Organisation for Migration (IOM) said 39,289 migrants and refugees made it to Europe by sea this year as of Sunday - about 34% fewer than during the same period in 2018.

Greece and Spain were the entry points for 82% of Europe's new arrivals via the Mediterranean since January 1, while the number of migrants entering Italy dropped significantly - from 18,872 during the first seven months of 2018 to 3,950 this year.

The number of known migrant deaths at sea also declined, from 1,517 between January 1 and August 4 last year to 840 this year, the IOM said. This year's estimate did not include 20 migrants who are believed to have died over the weekend.