A 30-year-old man was arrested last night for trying to steal a woman's 4-month-old baby onboard a J train in Brooklyn, according to police.

The NYPD says that at around 11:27 p.m. last night on a J train near the Alabama Avenue station in Cyprus Hills, Rafael Martinez, 30, sat "close" to a woman's 3-year-old niece. The woman, who was with her mother-in-law and had her 4-month-old baby resting in a carseat in a stroller, allegedly asked Martinez to move away repeatedly; instead, police say Martinez grabbed the baby's carseat and tried to pull it out of the stroller

Cops say the woman and her mother-in-law tried to wrest the carseat from Martinez. A good Samaritan helped pull him away and pinned him to a subway seat, according to police. Martinez allegedly yelled in Spanish, "Let me go, I want the baby."

Martinez was arrested and and charged with attempted kidnapping and acting in a manner injurious to a child. Cops say they also found a small bag of cocaine in his possession, so he has been charged with possession of a controlled substance as well. He has multiple past arrests including one for child endangerment, according to the Daily News.