The government's Mental Health Bill strikes the "right balance" between patient safeguards and protecting the public, the health secretary has said.
The bill calls for people with severe personality disorders to be held
Patricia Hewitt told the Commons it was "essential" to ensure discharged patients continued taking medication.
The bill, which will allow people to be held against their will even if they have not committed a crime, has been attacked by the Tories as "punitive".
They and the Lib Dems say the plan would stop sufferers seeking help.
Ministers want to allow people with severe or violent personality disorders to be confined if they are judged to be a threat to themselves or others.
Ms Hewitt told the Commons: "Modern medicine and clinical practice has shifted the whole focus of care into the community and the law needs to follow.
"The bill would enable a patient who is detained in hospital to be released under supervised community treatment, enabling some patients to be discharged into the community earlier than would otherwise have been the case."
This would be a "real benefit to themselves and often their carers as well", she added.
Ms Hewitt also said: "I believe this bill strikes the right balance ... between modernising the legislation in line with the development of clinical practice, improving patient safeguards and protecting more people from harm."
The government says amendments to the bill passed in the Lords in February should be overturned.
Peers voted against the idea of compulsion, saying treatment should be given only if it was likely to help the patient.
Shadow health secretary Andrew Lansley said the government's argument that it was trying to balance the "rights of patients and the protection of the public" was a "false dichotomy".
"They want to force the argument in the direction they want to go," he said, adding: "Compulsion is not the only route to treatment.
"Thousands of patients will access services without compulsion."
Liberal Democrat Norman Lamb Mr Lamb said: "We want to see core principles set out on the face of this bill.
"Those facing compulsion should have a right to an independent mental health advocate and they should be made aware of that right."
The government has been trying to overhaul mental health laws since 1998.
It was spurred into action by the conviction of Michael Stone for the murders of Lin and Megan Russell.
Stone was regarded as a dangerous psychopath but, because his condition was untreatable, he could not be held under mental health powers.
Previous attempts to change the laws have been abandoned over concerns the government is too occupied with public safety, rather than the needs of patients.
The bill would affect an estimated 14,000 of the 600,000 people who use mental health services each year.
It gained its second reading in the Commons without a vote. Ministers are expected to attempt to overturn the earlier Lords defeats at a later stage.