Jennifer Garner almost showed a little too much of her holy spirit in church recently.

Broadimage/REX/Shutterstock

While speaking to People magazine, the actress said she detailed the time she nearly gave her fellow worshippers a shot of her underwear.

"My skirt got caught in my panties at church a couple of weeks ago," said said, adding that she nearly walked out of the restroom and into the congregation while showing far more than she bargained for. But, she caught the near wardrobe malfunction just in the nick of time.

"Luckily I felt a breeze pretty quickly," she joked.

Jen, of course, is a regular at church and she's actually often seen there with her ex Ben Affleck. In fact, on Nov. 4, Ben and Jen were photographed chatting after the church service. Ben even put his hand on Jen's shoulder at one point, clearly indicating that the exes are in a good place.

Broadimage/REX/Shutterstock

The former duo — who shares Violet, 12, Seraphina, 9, and Samuel, 6 — also attended Game 4 of the World Series recently.

Both Ben and Jen have moved on romantically, but they remain close. Jen, you'll recall, was very supportive of Ben, even driving him to a rehab facility earlier this year.

At the time, she reportedly told him about reservations she had about the woman he was dating, 22-year-old model Shauna Sexton.

"Close friends were honest with him about being in a relationship with someone who was only 22 years old," a source told ET in October. "Jen's opinion truly still matters to Ben. Jen tried to be supportive of his relationship with Lindsay [Shookus] but she couldn't get behind this."

Ben and Shauna split in October.