Transport for London (TfL) has banned adverts encouraging landlords to ditch their long-term tenants, after a flurry of complaints from politicians and the public.

The transport network said it would no longer allow adverts that encouraged property owners to break the law.

Over the summer, adverts from Airbnb management company Hostmaker told landlords they could make more from properties by switching to short-term or medium-term lets.

But it is illegal to offer a short-term let in London for more than 90 days without prior permission from the local council.

The 2015 legislation aimed to tackle the high number of holiday properties putting pressure on London’s already costly rental market.

TfL has now updated its guidelines saying ads “must not, expressly or by implication, promote the use of residential properties in London for short term ‘holiday lettings’ in a way that contravenes planning laws”.

Labour London Assembly member Tom Copley, the party’s housing spokesperson at City Hall, said it was “hugely positive” to see TfL taking action.

Mr Copley wrote to Sadiq Khan in May asking him to ban adverts of this kind.

He said: “In recent months, we have seen adverts across the TfL network encouraging landlords to flout the law when it comes to short term lets.

“In the midst of our housing crisis and with rents rising, this has been sending the wrong message to beleaguered Londoners living in a largely unfair and unforgiving private rented sector in urgent need of reform.”

But Green London Assembly member Sian Berry has been raising the issue with the Mayor since June last year, and said these adverts are just one part of the problem.

She said: “Londoners shouldn’t be bombarded with messaging on their daily journeys that undermines or harms their lives or their communities.

“We’ve had adverts on the TfL network that make light of sexual assault on women, ones that come from repressive regimes and some that body-shame people.

“The Mayor should review TfL’s whole advertising policy to proactively stop this.”