BOSTON (AP) — A former Massachusetts transit officer convicted of assaulting a woman has been sentenced to six months in jail.

Former Massachusetts Bay Transportation Authority officer Jennifer Garvey was convicted of assault and battery last month and sentenced Monday. Prosecutors say the 34-year-old Garvey pepper-sprayed and beat a bystander who was concerned about Garvey's treatment of a bus rider.

After the attack, Garvey filed a report in which she accused the woman of being physically aggressive. After an investigation, prosecutors dropped charges against the victim.

Garvey was sentenced to 18 months behind bars, but will only serve six months. She was also sentenced to two years of probation, and will serve the full sentence if she violates it.

Garvey previously denied the charges.