Leaving hospital
Explains your rights related to leaving hospital after being sectioned and detained under the Mental Health Act 1983.
Section 117 aftercare
After your section ends or someone discharges you, you're usually free to leave hospital. And you might also have the right to access aftercare under section 117 of the Mental Health Act.
You might feel confused about what section 117 involves and how to get it after leaving hospital. You're not alone, and our information is here to help you.
On this page
Read about:
- What is section 117 aftercare?
- Who can get section 117 aftercare?
- What types of aftercare does section 117 provide?
- Who provides section 117 aftercare?
- How do I pay for section 117 aftercare services?
- How long does section 117 aftercare last?
- What if there are problems with my section 117 aftercare?
What is section 117 aftercare?
After being detained under the Mental Health Act, you might have the right to free support after leaving hospital. Section 117 of the Mental Health Act outlines this right.
You'll usually hear this called ‘section 117 aftercare’. Aftercare is the help you'll get in the community after discharge. For example, healthcare, social care or supported housing.
Section 117 defines aftercare as services that do all of the following:
- Meet a need that arises from, or relates to, your mental health problem.
- Reduce the risk of your mental health getting worse.
- Reduce the risk of you having to go back to hospital for mental health treatment.
Who can get section 117 aftercare?
You can get section 117 aftercare for free if you're leaving hospital after being detained:
- For treatment under section 3
- Under a hospital order, like section 37
- Following transfer from prison under section 47 or 48
- Under a hospital direction, like section 45a
You also have the right to section 117 aftercare if either of these points apply:
- You've been discharged onto a community treatment order (CTO)
- You're a restricted patient on a conditional discharge
For information on different types of sections, visit our page about sectioning.
In any of these cases, your right to section 117 aftercare applies as soon as your section ends. It applies immediately whether you:
- Leave hospital right away
- Stay on as an informal patient
Examples: who has the right to section 117 aftercare?
- Mac was discharged from a section 2. As section 117 does not cover section 2, they do not have a right to free aftercare.
- Hannah was discharged from hospital after spending a month as an informal patient. Section 117 does not cover informal patients, so she's not entitled to aftercare.
- Miriam is on trial leave for a supported accommodation placement. On this trial, she remains under section 3. As her hospital leave is long-term and unescorted, section 117 applies during her trial period.
- Ayo was discharged from his section 3. But he did not feel ready to leave hospital and chose to stay for a month as an informal patient. Section 117 aftercare covers section 3. So even though Ayo chose to stay in hospital after discharge, he has the right to section 117 aftercare.
- Clarence was transferred to hospital from prison under section 47. He was detained in hospital, but went back to prison when he no longer met the criteria for hospital detention. He is now entitled to aftercare services under section 117.
What types of aftercare does section 117 provide?
The English and Welsh Codes of Practice give examples of what aftercare services might look like under section 117.
These include:
- Healthcare, including prescribed medication
- Social care and employment services
- Services that appropriately meet your social, cultural or spiritual needs
- Supported accommodation
Example: section 117 aftercare service types
Jorge has received confirmation that he can now leave hospital after being detained under section 3. He has a diagnosis of bipolar disorder and type 1 diabetes. He also has a history of difficulties with drugs and alcohol, which has affected his mental health.
Jorge is entitled to drug and alcohol counselling services under section 117. This service meets a need related to his mental disorder and reduces the risk that he'll need to come back into hospital. He'll get these counselling services for free.
But he doesn't have the right to any additional, free social care services for having diabetes. This is a physical condition. Section 117 aftercare only covers mental health problems.
Who provides section 117 aftercare?
Providing section 117 aftercare services is the duty of both of the following bodies:
- The integrated care board (ICB) in England or the local health board (LHB) in Wales.
- Your local social services authority – usually for the area where you lived before you were detained.
They're responsible for providing your aftercare services. They often provide these along with voluntary agencies.
You might find there are disputes about payment between the local bodies who provide your aftercare. Even if this happens, it should not delay your care planning and discharge.
How do I pay for section 117 aftercare services?
Section 117 aftercare is free, but you'll need to manage payments for the services. Local authorities can make payments directly to you, or someone else suitable, to pay for the services. They'll usually make arrangements to pay for something for you, like a direct debit. It's not usually a reimbursement.
To have your services paid for under section 117, you must be an adult. The following conditions also apply:
- You must have the capacity to ask for direct payments.
- If you want someone to act on your behalf, they must agree to this.
- The local authority must agree that you or someone acting on your behalf can manage the direct payments. You can get help from others if needed, such as family members.
- The local authority must agree that making direct payments is appropriate for meeting your aftercare needs.
You also have the right to request a Personal Health Budget (PHB). This is an amount of money you can use to meet your aftercare needs.
You can request a PHB before or after discharge. Your ICB should support you to decide whether to request this.
For more information, see our page on direct payment and personal budgets.
How long does section 117 aftercare last?
You'll get free aftercare under section 117 until the providers are satisfied that you no longer require it. The providers are your ICB or LHB, plus the local authority.
Your care co-ordinator will review your need for aftercare services 6 weeks after discharge. They should then review your needs annually, or sooner if your circumstances change.
The English and Welsh Codes of Practice say that you should be involved in any decision-making process to end your aftercare.
The codes also say that your section 117 aftercare services should not stop for any of these reasons:
- You've been discharged from the care of a specialist mental health service.
- Authorities have decided upon a certain timeframe of care provision. For example, they can't simply set a deadline of 8 weeks for aftercare. They must provide care until you no longer require it.
- You've been deprived of your liberty under the Mental Capacity Act.
- You've returned to hospital as an informal patient.
- You've returned to hospital to be detained under section 2.
- You're no longer on a CTO or on section 17 leave.
When your aftercare services stop, your mental health might start getting worse in some cases. If this happens, you should be able to receive aftercare again.
What if there are problems with my section 117 aftercare?
Your local authority and ICB or LHB have a legal duty to provide section 117 aftercare. But they can choose which services to provide.
If you have a problem with any services they choose to provide, you have several options:
- You can raise most problems with your care co-ordinator. This should be the first thing you try – they might be able to find a solution for you.
- If your problem is with health-related services. In this case, follow their own complaints procedure. If you're not happy with the outcome or how your complaint was handled, ask the Health Service Ombudsman to investigate. They can make recommendations to put things right.
- If your problem is about social care provided or paid for by the local authority. In this case, follow your local authority's complaints procedure. If you're not happy with the outcome of your complaint or how it was handled, ask the Local Government Ombudsman to investigate. They can make recommendations to put things right.
- You can ask for a judicial review. You can take the ICB, LHB or local authority to court. The court does not decide whether the aftercare decisions were wrong, but whether they were made properly. The court will take all relevant circumstances into account. Judicial review claims must be brought within 3 months of the decision you're challenging.
For more information, see our guide on health and social care complaints.
Care coordinator
A care coordinator is your main point of contact and support if you need ongoing mental health care. They:
- Keep in close contact with you during your care
- Monitor how your care gets delivered – particularly when you’re not in hospital
They're also responsible for doing the assessment to work out your health and social care needs under the care programme approach (CPA).
They could be any mental health professional. But they usually work as part of the community mental health team. For example:
- A nurse
- A social worker
- Another mental health worker
It depends what's most appropriate for your situation.
Visit our full listing of Legal TermsCapacity
'Capacity' means the ability to understand information and make decisions about your life. Sometimes it can also mean the ability to communicate decisions about your life.
See our pages on the Mental Capacity Act for more information.
Visit our full listing of Legal TermsJudicial review
Judicial review is a type of court procedure where a judge reviews a public authority’s decision, policy, practice, action or failure to act. And they decide whether it's lawful or not.
If they decide it's not lawful, the court can cancel the decision or action (‘quash’ it). They can also order the public authority to reconsider it.
Visit our full listing of Legal TermsOmbudsman
An ombudsman is an official appointed to investigate a complaint against a company, an organisation, or a public authority. The ombudsman is independent of:
- The NHS
- Providers of care
- Local authorities
- The government
Community treatment order (CTO)
If you've been sectioned and treated in hospital, your responsible clinician can put you on a CTO.
This means that they can discharge you from the section and you can leave hospital. But you might have to meet certain conditions. For example:
- Living in a certain place
- Going somewhere for medical treatment
Sometimes you could be made to go back to hospital. For example:
- If you don't follow the conditions
- If you become unwell again
See our pages on CTOs for more information.
Visit our full listing of Legal TermsConditional discharge
This is where you can leave hospital but have to follow some conditions. For example, living at a particular place or meeting healthcare professionals. If you break these conditions, you can be sent back to hospital.
You can only be put under a conditional discharge if you're a restricted patient under a restriction direction, and also:
- You've been sectioned by a court under the Mental Health Act and have been charged with a crime
Or
- You've been transferred to hospital from prison under the Mental Health Act
Informal patient
This means you've chosen to go into hospital. You haven't been sectioned. It's also called being a 'voluntary patient'.
Visit our full listing of Legal TermsLocal Health Boards (LHBs)
LHBs are a key part of the health service in Wales. They exist to create and deliver services based on the needs of the local community.
Visit our full listing of Legal TermsMental Health Act Code of Practice
This tells health professionals how they should follow the Mental Health Act. The Code is not law. So a court cannot enforce it. But health professionals should follow it unless there is a good reason not to.
The Code covers some areas not specifically mentioned in the Mental Health Act. Such as visiting rights and the use of seclusion.
If a health professional doesn’t follow the Code, you can make a complaint.
Visit our full listing of Legal TermsMental Health Act 1983 (MHA)
The MHA is a law that applies to England and Wales. It allows people to be detained in hospital (sectioned) if they have a mental health disorder and need treatment. You can only be kept in hospital if certain conditions are met.
See our pages on the Mental Health Act for more information.
Visit our full listing of Legal TermsSection 17 leave
This is where your responsible clinician gives you permission to leave the ward or the hospital for short periods. They may ask you to keep to certain conditions, such as returning within a certain time.
Visit our full listing of Legal TermsIntegrated care boards (ICBs)
ICBs are part of the NHS. They:
- Look after the health needs of people in their area
- Plan and deliver services
- Manage the NHS budget
Membership of each board varies but usually includes healthcare professionals and local authority representatives. ICBs were introduced in 2022 to replace clinical commissioning groups (CCGs).
Visit our full listing of Legal TermsSection
Being 'sectioned' means that you're kept in hospital under the Mental Health Act. There are different types of sections. Each have different rules to keep you in hospital. The length of time that you can be kept in hospital depends on which section you're detained under.
See our pages on sectioning for more information.
Visit our full listing of Legal TermsDetained
A person is detained if they're being kept in hospital under section and are not free to leave.
Visit our full listing of Legal TermsRestriction order or restriction direction
If a court believes a patient poses a risk to the public it can add this type of court order to a hospital order under section 41. It means that only the Secretary of State for Justice can approve the patient’s discharge, transfer or leave from hospital. So it’s harder to get a discharge from the tribunal. The person will be subject to certain conditions for as long as the restriction order remains, even after discharge.
Visit our full listing of Legal TermsMental Capacity Act 2005 (MCA)
The Mental Capacity Act 2005 is the law that tells you what you can do to plan ahead in case you can't make decisions for yourself. It includes how you can ask someone else to make decisions for you. And who can make decisions for you if you haven't planned ahead.
See our pages on the Mental Capacity Act for more information.
Visit our full listing of Legal TermsMental disorder
When the Mental Health Act talks about someone with mental health problems, it often uses the term 'mental disorder'. The Act says that this can include "any disorder or disability of mind".
Mental disorder can include:
- Any mental health problem normally diagnosed in psychiatry
- Certain learning disabilities
Published: August 2026
Next review planned: August 2029
References are available on request. If you would like to reproduce any of this information, see our page on permissions and licensing.