Legal measures designed to safeguard some people detained in care facilities are "failing those they were set up to protect", a new review has found.
The current system for detaining patients with dementia or learning difficulties for their own safety should be "replaced as a matter of pressing urgency", the Law Commission said.
The Government-commissioned review concluded that thousands of vulnerable people are being detained without the appropriate checks.
In some circumstances, patients who lack the mental capacity to consent need to be detained in a place like a hospital or care home when it is in their best interests.
This is known as a deprivation of liberty and a proper authorisation process should be in place to ensure it is done lawfully.
Last year it emerged that applications to local authorities to deprive people of their liberty were at their highest ever level.
Deprivation of Liberty Safeguards (DoLS) applications in England reached 195,840 in 2015/16, the highest since they were introduced in 2009.
The Commission said that an increasing number of DoLS referrals are also being left unassessed and statutory timescales are being "routinely breached".
Of 195,840 applications, only 43% were completed in the year, the commission said.
And out of those, only 29% were completed within the 21 day time-limit set in regulations.
A Supreme Court judgment in March 2014, which introduced an ''acid test'' for depriving people of their liberty, has fuelled a rise in applications from places such as care homes.
The Law Commission, an independent body set up to review laws, said that since the landmark legal case, local authorities have been under increased administrative pressures.
As a result, last year 100,000 people who required the authorisation did not receive it.
The new review said that the system should be replaced with a new scheme, called the Liberty Protection Safeguards.
Law Commissioner Nicolas Paines QC said: "It's not right that people with dementia and learning disabilities are being denied their freedoms unlawfully. There are unnecessary costs and backlogs at every turn, and all too often family members are left without the support they need.
"The Deprivation of Liberty Safeguards were designed at a time when considerably fewer people were considered deprived of their liberty. Now they are failing those they were set up to protect. The current system needs to be scrapped and replaced right away.
"We know there are enormous pressures on health and adult social care at the moment and our reforms will not only mean that everyone is given the protections they need, but could also deliver a saving to the taxpayer. That's cash that can then be directly reinvested to support those most in need."
When a person is the subject of DoLS, measures can be used to control them, including the use of locks on doors and straps on chairs and wheelchairs.
The person can be made to stay somewhere against their wishes or the wishes of a family member, have regular sedation to control their behaviour or have objects or belongings removed for their safety.
The new review has set out 47 recommendations, including a call for the DoLS to be replaced "as a matter of pressing urgency".
Under a new system, patients would receive enhanced rights to advocacy and periodic checks on their care or treatment arrangements.
It would also place a greater prominence on the person's human rights, and of whether a deprivation of their liberty is necessary and proportionate.
The Commission also called to extend who is responsible for giving authorisations from councils to NHS bodies.
A Department of Health spokeswoman said it would respond to the recommendations in due course, adding: "This Government is committed to protecting the rights of vulnerable people - that's why we commissioned this review.
"We also gave local authorities £25 million to help them manage increased administrative pressures following the 2014 Supreme Court judgment."
Izzi Seccombe, chairwoman of the Local Government Association's Community Wellbeing Board, added: "The current law is not fit for purpose, and we fully support the need for reform, and look forward to exploring the detail behind the Law Commission's recommendations."