ATLANTA — Oprah Winfrey had long been looking for something that would keep OWN viewers from switching to other channels. The answer to her prayers turned out to be a juicy drama series set in a house of worship.

“Greenleaf,” which co-stars Winfrey in a recurring role, premiered last year as the most-watched debut in the six-year history of her network and has given the media mogul a boost of confidence.

“It helped me trust my instincts, because for the first couple of years of OWN, I lost a sense of what would work or not,” Winfrey said.

“We were trying to do so many different things. Trying, trying and trying things all the time. When this worked, I thought ‘OK, I now see that when you move and operate specifically from the core of what you believe is right, it works.'”

“Greenleaf” delves into a story about the troubled first family of a sprawling Memphis, Tennessee, megachurch where adultery and domestic abuse cause disorder.

The second season of the show premieres Wednesday at 10 p.m. EDT on OWN.

The show stars Merle Dandridge as Grace “Gigi” Greenleaf, the estranged daughter who returns home after 20 years and is trying to investigate her family’s past crimes.

Her character has been thrust into the pulpit as a pastor at her family’s megachurch business, which is run by her parents, Bishop James (Keith David) and Lady Mae (Lynn Whitfield).

Winfrey plays the character of bar owner Mavis McCready, the sister of Lady Mae.