RICHMOND, Va. (AP) — Persistence paid off for Del. Joe May, whose bill making it illegal to secretly use an electronic device to track a person's movements has cleared both chambers of the General Assembly on his fourth attempt.

The Senate voted 32-8 Tuesday to pass May's bill, which now goes back to the House of Delegates for agreement on a minor amendment. After that, the bill goes to Gov. Bob McDonnell's desk.

May, R-Loudoun County, first introduced the legislation in 2010 at the behest of a constituent who took his car to a mechanic for service and learned his wife had surreptitiously placed a GPS device on the vehicle. The man was shocked to learn that what she did was not illegal.

"In Virginia, we never rush into things," May said after the Senate vote. "This deals with new technology, and it took a while for people to get comfortable with it."

May's bill makes it a class 3 misdemeanor, punishable by a fine of up to $500, if someone deceptively uses an electronic device to track another person.

The bill carves out exemptions for police in the performance of their official duties, parents tracking their children, any legally authorized representative of an incapacitated adult, owners of fleet vehicles, electronic communications providers like OnStar and private investigators who have an owner's permission to place a device on his car or other property. The private investigator exception doesn't apply if the investigator is working for someone who is subject to a protective order or is trying to commit a crime.