PEMBROKE PINES, Fla. -

A veteran Miami Beach detective accused of having sex with a foster teen turned himself into police Saturday, Pembroke Pines police said.

Authorities said a warrant was obtained Friday for the arrest of 48-year-old Oldy Ochoa in the investigation.

Ochoa surrendered himself Saturday to the Broward County Jail, where he was booked, processed and released on bond. Ochoa was charged with two counts of sexual battery.

Police said Ochoa told the 17-year-old girl she could live with him, his wife and his children.

One day when Ochoa was taking the teen to college, he had parked his police cruiser in a secluded alley and had sex with her, according to police.

The teen said they had sex on another occasion and continued having contact through social media and text messages.

Related: Foster teen alleging sex with cop provides salacious details