BY Rich Schapiro
Friday, April 22, 2016, 4:22 PM

Paul Fox, 63, was arrested in Maine Wednesday and returned to Connecticut Friday.

A former psychiatrist who treated Sandy Hook shooter Adam Lanza has been charged with sexual assault for carrying on an illicit relationship with a former patient, authorities said Friday.

Paul Fox, 63, was arrested in Maine Wednesday and returned to Connecticut Friday.

Fox’s relationship with the female patient was initially uncovered by Connecticut state police detectives investigating Lanza’s history in the aftermath of the 2012 Sandy Hook Elementary School massacre.

The woman, who was 18 or 19 at the time, initially refused to come forward to the police. But she changed her mind and filed a criminal complaint two years later, said a Brookfield, Conn. police spokesman.

Fox, who treated Lanza when he was a teenager, surrendered his Connecticut medical license in 2012 after the relationship was uncovered.

The patient, in a nine-page sworn statement, said she had sex with Fox “in his office” and spent time on his sailboat, according to state health records obtained by the Hartford Courant.

The patient said the relationship lasted for more than one year.

The woman also reported that one of Fox’s other patients told her that she was “having phone sex with the same doctor,” according to regulatory records.

Fox was living in New Zealand when the 20-year-old Lanza murdered 20 children and six school staffers.

In a December 2012 phone interview, Fox told detectives that he had destroyed any records related to Lanza and had last treated him when the boy was about 15.

Fox said the troubled teen was “very rigid … resistant to engagement” and recalled that he had “aggression problems,” police reported.