A Texas megachurch pastor is taking a leave of absence after his church learned of frequent messages between him and a woman who is not his wife.

Matt Chandler, the lead pastor at the Village Church in Flower Mound, about 30 miles northwest of Dallas, told his congregation on Sunday the move was prompted by what the church’s leaders called inappropriate messages between the pair.

In the statement recorded and shared to the church’s website, the pastor explained that a few months back, a woman approached him in the church’s foyer with concerns about “how I was (direct messaging) on Instagram with a friend of hers.”

“I didn’t think I had done anything wrong in that,” Chandler, 48, told the congregation. “My wife knew that, her husband knew that, and yet there were a couple of things that she said that were disorienting to me.”

That same evening, Chandler shared those concerns with his wife, Lauren, and two elders, in an effort to address the situation, The Village Church wrote in an Aug. 28 statement on its website.

The elders, the statement continues, then commissioned an independent law firm to conduct a review of Chandler’s messaging history across social media platforms, his cellphone and his email.

The investigators’ report led the elders to conclude that Chandler had violated the church’s internal social-media use policies, and “more importantly that, while the overarching pattern of his life has been ‘above reproach’, he failed to meet the (Bible’s) standard for elders of being “above reproach” in this instance,” the statement reads.

“While the messages were not romantic or sexual in nature, the frequency and familiarity of the messages crossed a line. They revealed that (he) did not use language appropriate for a pastor, and he did not model a behavior that we expect from him.”

The statement said his leave of absence is “both disciplinary and developmental, which allows him to focus on growing greater awareness in this area.”