25th Hour

A canary yellow vintage Super Bee pulls up short on a New York City street, and Montgomery "Monty" Brogan gets out with his buddy Kostya to look at a dog lying in the road. The animal was mauled in a dogfight so Monty intends to shoot him, but changes his mind after he looks it in the eye. Monty decides to take the dog to a nearby clinic instead.
Fast forward to late 2002. Monty is about to begin serving a seven-year prison sentence for dealing drugs. He sits in a park with Doyle, the dog he rescued, on his last day of freedom. He plans to meet childhood friends Frank Slaughtery and Jacob Elinsky at a club with his girlfriend Naturelle. Frank is a hotshot trader on Wall Street; Jacob is an introverted high school teacher with a crush on 17-year-old Mary, one of his students.
Monty visits his father, James, a former firefighter and recovering alcoholic who owns a bar, to confirm their plans to drive to the prison the following morning. Monty's drug money helped James keep the bar, so a remorseful James sneaks a drink when Monty goes to the bathroom. Facing himself in the mirror, Monty lashes out in his mind against everyone else: all the New York stereotypes he can think of, from the cabbies to the firefighters, the corner grocers to the mobsters, as if he hates them all. Finally, he turns on himself, revealing that he is actually angry for getting greedy and having not given up drug dealing before he was caught.
In a flashback, Monty remembers the night he was arrested. Detectives come to Monty's apartment while he's still there. They find the drugs immediately and not after any real search, suggesting that Monty had been betrayed. Monty sold drugs for Uncle Nikolai, a Russian mobster. Kostya tries to persuade Monty it was Naturelle who turned him in, since she knew where he hid his drugs and money. Monty refused to turn state's evidence against Nikolai, but he's not sure what Nikolai will do at the club that night. Monty remembers how he met Naturelle when she was 18, hanging around his old school, and how happy they were. He asks Frank to find out if it was Naturelle who betrayed him.
Jacob sees Mary outside the club, so Monty invites her inside with them. Discussing what kind of a future Monty can have after prison, Frank says they can open a bar together, even though he told Jacob he believes Monty's life is over, and that Monty deserves his sentence for dealing drugs. Frank accuses Naturelle of living high on Monty's money, not caring where it came from, but she reminds Frank that he knew as well and said nothing. The argument culminates in Frank's insulting Naturelle's ethnicity, followed by her slapping Frank and leaving. Jacob, meanwhile, finds the courage to kiss Mary, but both appear to be in shock afterwards and go their separate ways.
Monty and Kostya go see Uncle Nikolai, who gives Monty advice on surviving in prison. Nikolai then reveals it was Kostya, not Naturelle, who betrayed Monty, and offers him a chance to kill Kostya in exchange for protecting his father's bar. Monty refuses, reminding Nikolai that he had asked Monty to trust Kostya in the first place. Monty walks out, leaving Kostya to be killed by the Russian mobsters.
Monty returns to his apartment and apologizes to Naturelle for mistrusting her. At the park, he transfers custody of Doyle to Jacob. Then he admits that he is terrified of being raped in prison, whereupon he asks Frank to brutally beat him, saying if he goes in ugly he might have a chance at survival. Frank refuses, so Monty deliberately provokes him. Frank is goaded into taking out his frustration, leaving Monty bruised and bloody, with a broken nose. Frank is in tears as Monty gets up and goes home.
Naturelle tries to comfort him as Monty's father arrives to take him to Federal Correctional Institution, Otisville. On the drive to prison, James suggests they go west, into hiding, giving Monty one last vision of freedom. Once again Monty sees a parade of faces from the streets of the city, followed by a vision of a future where Monty avoids imprisonment, reunites with Naturelle, starts a family, and grows old. As the fantasy ends, we see Monty, his eyes closed and face still bruised, sitting in the passenger's seat of the car, which has driven past the bridge to the west and towards prison.

Question: Who invited Mary inside?
Answer: Monty