British tourists are set to find trips to Mallorca and Ibiza more expensive as a law placing a cap on the number of hotel beds and stricter rules governing holiday rentals are introduced.

The Balearic Islands’ government has introduced the restrictions in an effort to appease local residents, who have been complaining that they are being priced out of the rental market by holidaymakers.

New rules will ban flat owners from renting their apartments via websites such as Airbnb and Homeaway unless they obtain a special licence to do so. Owners face fines of up to €400,000 (£361,000) if they break the law, and the websites face the same fine for letting people advertise without a valid licence number.

The new law introduces a cap of 623,624 beds that can be used for tourists, and there are plans to cut that by 120,000 over the next few years. Almost 70% of the beds assigned will be in Mallorca and more than half will be in hotels.

There will be no new licences issued for the next year under the plan, which the left-wing coalition government claims will make tourism more sustainable. But critics say the law is confusing and will take a toll on the local economy.

Airbnb users condemned the move, saying it would force people to stay at larger hotel chains rather than renting flats from private owners. “So-called progressive political parties are ironically banning social renting to hand over everything to big hotel chains,” read one comment on Foro Vacacional, a Spanish online forum for holiday rental professionals, which takes sponsorship from Airbnb and Homeaway.