Former evangelical pastor Ted Haggard's wife says she knew about his struggles with same-sex attraction for years and felt he was "winning the battle" before a scandal involving a male prostitute triggered his downfall in late 2006.

Gayle Haggard makes the remarks in an appearance with her husband on "The Oprah Winfrey Show" to air Wednesday. She said she was shocked when Haggard first told her the truth about the allegations against him.

"The first words out of my mouth were, 'Who are you?'" she said, according to a publicity release issued Tuesday by Harpo Productions.

However, Gayle Haggard also said her husband told her early in their 30-year marriage that he "struggled with some thoughts."

"I felt it was the thing that could destroy Ted if he gave in to it," she said. "So I prayed for him and I felt as though he was winning the battle."

Haggard, 52, resigned as president of the National Association of Evangelicals and New Life Church in Colorado Springs, Colo., after the male prostitute went public. Haggard confessed to "sexual immorality."

The scandal widened in recent days with disclosures that Haggard also admitted to an "inappropriate" relationship with a church volunteer, Grant Haas, who was 22 at the time.

Haas told KRDO in Colorado Springs that Haggard performed a sex act in front of him and sent him illicit text messages. He informed New Life Church shortly after the scandal broke, and the two parties reached a settlement in 2007 that included a confidentiality agreement. Haas went public as Haggard was heavily promoting an HBO documentary about his time in exile.