A new by-law has banned people from swimming in the River Thames without prior permission from the Port of London Authority (PLA).
The PLA has grown concerned by an upsurge in so-called wild swimming, made popular by comedian David Walliams' 140-mile Sport Relief swim.
The authority said the ban was needed because it had a responsibility for the safety of all river users.
The measure is due to come into effect on Sunday.
From Sunday, a person will need prior written permission to swim anywhere in the Thames between Crossness in east London and Putney Bridge in south-west London.
The PLA said it had seen an increased interest in river swimming since David Walliams swam the length of the Thames from Lechlade, Gloucestershire to Westminster Bridge in central London last year.
But the river is potentially dangerous, with tides, strong currents, and whirlpools.
The PLA's chief executive Richard Everett, said there were good reasons for stopping people wading in.
He said: "We have a responsibility not only to the individuals, but also to other river users.
"There's always a risk that if a boat comes across a swimmer, it has to take evasive action and that puts the people on the boat at risk, as well as other boats."
The law does not apply to people "undertaking diving activity" or "engaged in the emergency repair or inspection of vessels or structures".
Journalist Matthew Parris criticised the move.
In 2010 he admitted diving in to the Thames in the middle of the night, making his way across, aided by a friend on the opposite bank who held a torchlight.
He was criticised at the time, especially as he misjudged the tidal currents and was swept upstream.
He said: "Swimming in the Thames is dangerous, swimming in the sea is dangerous, swimming in any river is dangerous.
"There are all kinds of dangers and they're dangers that we take into account before we try it."