DORAL, Fla. (WFLA) — A Miami-Dade police officer is accused of putting an Apple AirTag in his ex-girlfriend’s car in order to track and stalk her.

WPLG reported 27-year-old Javier Magarin was arrested Thursday after a months-long investigation.

Magarin began stalking his ex-girlfriend hours after she broke up with him on March 20 and moved out, according to Local 10. The woman suspected there was something in her car after she heard noises she thought were those of an AirTag coming from inside.

The news outlet said the victim texted Magarin to ask if he put something in her car, but he denied it.

The woman kept hearing the noises from the device for the next week, according to Local 10. She then took her car to a friends house without telling Magarin.

WPLG reported Magarin then texted the woman that he saw her car outside the friend’s house, further leading her to believe there was some kind of tracking device in her car.

According to Local 10, Magarin eventually admitted via text to putting the device under a floor mat in the woman’s car but said he took it out on March 23. He also allegedly texted her that he was mad she changed her Instagram password.

After it was reported to police, WPLG reported officers found an AirTag device taped to the bottom of the woman’s car. It was later determined to belong to Magarin.

A Miami-Dade Police Department spokesperson told Local 10 Magarin was relieved of duty and is under house arrest. He faces stalking and illegal use of a tracking device charges.

Magarin was hired by MDPD in 2021.