12:10 PM PT -- Bam was just released from jail.
Bam Margera is behind bars after getting into it with patrons in the bar of a Hollywood hotel, and this video of his arrest is bizarre and, frankly, kinda sad ... when you consider he's supposed to be in rehab right now.
Bam was booked at 2:30 AM Wednesday by LAPD. Cops tell us they were called to the Luxe Hotel on Sunset after a hotel staffer placed him under citizen's arrest. Bam refused to leave the premises after talking trash to hotel patrons.
TMZ obtained this video of Bam plopped down in the middle of the lobby in a standoff with the fist officer on the scene. She tried to convince him to get up and go peacefully -- warning that she had a lot of backup on the way -- but Bam remained seated.
The officer told Bam, "This is not a f**king reality TV show. I know you're fresh out of rehab, so let's get your s**t together." Bam had been spinning a weird story with a couple of customers in the bar -- that he'd been hired by one of their wives to catch him cheating ... and he stuck to that even once cops arrived.
He was eventually arrested for trespassing and is currently being held on $1,000 bail.
The bust comes on the heels of Bam telling Dr. Phil he would go to rehab. TMZ broke the story ... Bam agreed to get treatment last week after an intense session with Dr. Phil, where Bam's wife, Nikki, and his mother confronted him about his substance abuse.
We're told Bam did check into a treatment facility, but bailed within days. On Tuesday, he posted a video of himself getting Dr. Phil's name tatted on his neck, and thanked him for trying to get him help.
Bam is still behind bars right now and his bail has been set at $1,000.
Originally Published -- 6:43 AM PT