Amanda Bynes Ruse for Psych Hold Created by Britney Spears 'Bad Guy'

10/11/2014 1:00 AM PDT BY TMZ STAFF

The person who tricked Amanda Bynes into flying to L.A. where she ended up in a mental ward is none other than the man who some say created life-threatening peril for a then-unstable Britney Spears.

TMZ has learned ... Sam Lutfi -- who Britney's parents say was recklessly medicating her before she was eventually strapped to a stretcher and taken to a psych ward in 2008 -- contacted Amanda Thursday and convinced her to sue her parents. He got her to fly to L.A. so he could hook her up with a lawyer.

Here's what Amanda DIDN'T know ... Lutfi was secretly working with Amanda's parents and it was all an elaborate ruse to lure her out so doctors could place her on an involuntary psychiatric hold.

We now have more clarification as to how Lutfi pulled it off. He told Amanda her car would be making 2 stops. First, to the lawyer's office in Pasadena and then to the London Hotel in West Hollywood where she would confront her parents and tell them about the lawsuit.

She never got to the London, because the driver went to a Pasadena hospital which looked like an office building.  Amanda thought she was going to see the lawyer but when she walked inside she was surrounded by hospital staff.

TMZ broke the story ... Amanda was placed on a 72-hour psych hold which can be extended for 14 days.  We're told during that time her parents will attempt to get another conservatorship.

Lutfi -- who has always said he was actually protecting Britney -- is a hero in the eyes of Amanda's parents. We're told they are going to publicly thank him.