An accused would-be carjacker is in jail after the victim locked him in her garage before he could steal the car.

Andre Bacon, 21, allegedly entered the garage of the victim's Chicago home on Saturday afternoon and demanded that the victim hand over the keys to her 2012 Acura MDX.

She did as she was told, but then closed the door to the garage where the car was parked, effectively locking Bacon inside, the Chicago Sun-Times reported.

When police arrived, they opened the garage door and saw Bacon sitting in the driver's seat with the keys in the ignition, according to the Chicago Tribune.

Bacon was charged with attempted vehicular hijacking and theft. He is jail in lieu of $75,000 bail, according to the Associated Press.