Refugee rescue boats carrying stranded migrants will now face fines of up to €1 million, under the controversial law promoted by Italy’s far-right interior minister, Matteo Salvini.

The new law also provides for the arrest of captains who ignore orders to stay away and calls on naval authorities to seize their boats automatically.

The government won the vote by 160 to 57.

Salvini would have had to resign had it not won.

The decree had already been passed by the lower house and became law just a couple of days before parliament closes on Wednesday for the summer recess.

Some Five Star Movement (M5S) politicians have expressed concerns about the decree, and some of its senators did not back it in Monday’s vote.

Confidence votes are often used by Italian governments as a way of speeding legislation through parliament, truncating debate and sweeping away opposition amendments.

Salvini has clashed repeatedly with humanitarian groups that pick up migrants off the coast of Libya with the aim of bringing them to Italy, preventing them from docking until other EU countries agree to take in most of them.

In June, the German vessel Sea Watch 3, captained by Carola Rackete, was seized when it entered the port of Lampedusa without permission.

Rackete was arrested and later freed from house arrest, prompting Salvini to denounce the judge who issued the ruling.

“The security decree, with more powers to police forces, more border checks and more men to arrest mafiosi, is law,” Salivini tweeted on Monday.

 “I thank you, Italians, and the Blessed Virgin Mary.”