Maybe he should reflect on his own demons.

A Maryland pastor who tried to rape a girl blamed her “demons” for the sick attack, according to police.

Octavio Cantarero, 42, was charged with attempted rape and committing a sexual offense for trying to molest the girl in a room at his church in Gaithersburg, Montgomery County police said Tuesday.

Cantarero, pastor of Iglesia Pentecostal Principe De Paz, had been under investigation for months after the girl reported the alleged assault in May — and he surrendered to cops over the weekend, police said.

The minister met the girl, whose age was not released, in January.

He told her “she was too young to live alone,” gave her a room at his church to sleep in, “and stated that the two would sleep there,” police said.

The girl woke up one night while Cantarero was attempting to rape her and fought back.

“Cantarero asked the victim not to tell anyone about the incident and that he could pay for her clothes, rent and school,” the police statement said. “He also stated that her demons had provoked him.”

Police are asking for information on any other potential child victims who have had contact with Cantarero, who is being held without bail.