A Somerville man was allegedly caught with his pants down, masturbating on a Green Line trolley Thursday in Brighton before being collared by a woman who saw him. Michael Galvin, 37, of 71 Hudson St. was arrested on charged of open and gross lewdness, according to a transit police report.

A Somerville man was allegedly caught with his pants down, masturbating on a Green Line trolley Thursday in Allston before being collared by a woman who saw him. Michael Galvin, 37, of 71 Hudson St. was arrested on charged of open and gross lewdness, according to a transit police report.

On April 19 at about 6:53 p.m., MBTA officers went to the corner of Commonwealth Avenue and Brighton Avenue to meet with a victim who reported a man had exposed himself to her on a green line trolley. Officers met the victim at Packard’s Corner pulling a man by his sweatshirt.

“This is him,” she reportedly said.

Officers identified him as Galvin and asked him what had happened. He reported that he was on a crowded trolley heading towards Boston College when his shorts fell down due to the “packed and jostling” trolley. He said he did not know his shorts were down until the victim in front of him screamed “What the hell.”

He said he tried to pull up his shorts, apologized at the same time and then exited the trolley at Packard’s Corner but the woman followed him and said, “You aren’t going anywhere,” grabbed hold of his hooded sweatshirt and called police.

Officers took the woman aside to speak with her separately and reportedly found her “visibly distraught and upset.”

She told them she was on the trolley when she noticed the suspect had been moving closer and closer towards her since the previous stop. She reportedly “got a weird vibe from the guy and tried to move away” but couldn’t because the trolley was so packed.

As the train approached Packard’s Corner she saw the suspect was now directly in front of her. She looked down and reportedly saw the suspect’s shorts were pulled down just enough to have his penis exposed, and he was allegedly stroking it. When he realized what he was doing, he reportedly tried to pull his sweatshirt down to cover himself.

The victim said it took a moment to register and she immediately began to scream in shock at what she saw. As she was screaming she could hear the suspect saying sorry and he began to move away from her. He exited the trolley in an attempt to get away and the victim followed him and grabbed him by the sweatshirt to keep him from fleeing.

As she held on to his sweatshirt he reportedly said, “I think I need help. I think something is wrong with me” and tried to persuade her to let him go, she said.

Galvin was then placed under arrest, according to the report.