Steve Coogan is one in the long list of Britain’s top-quality comedic exports, of a level with Ricky Gervais, Simon Pegg and Rowan Atkinson, though inexcusably not so well known. He has played insensitive cads to hilarious effect in “Tropic Thunder,” “The Other Guys” and “The Trip.”

Now he explores his more serious side, starring with Judi Dench in “Philomena,” the true story of Philo­mena Lee, an Irish woman searching for the son she was coerced by the Catholic church into giving up for adoption 50 years earlier.

It was just the kind of challenge that energizes Coogan, whose characters are often funny and despicable rather than easy to love.

“I think a thing is by definition exciting if it runs the risk of failure,” he said. “The things that I’m interested in carry that risk,” and his biggest career regrets are appearing in films like the “Night at the Museum” series that play it safe and cuddly.

Coogan produced and co-wrote “Philomena” with Jeff Pope, winning the Best Screenplay prize at the Venice International Film Festival. He plays Martin Sixsmith, a serious journalist who, despite his disdain for undignified “human-interest stories,” helped Lee find out what happened to her son.

In a recent phone interview Coogan said the film represented his rejection of cynical, ironic film comedy, and offered him an ideal vehicle to explore issues of faith that have long been on his mind: his anger at the church as an institution, his respect for people of faith, and his own atheism.

“When I came across Philomena’s story [in Sixsmith’s 2009 book] I thought, ‘Finally, I can hang it on something.’ ”

Coogan, a native of Manchester, England, who was raised Catholic in a large family, said he respects and acknowledges the positive values of his religious upbringing, and the views of his churchgoing relations. “I wanted to have an adult conversation, to talk about things that matter to me and not arrive at a simplistic conclusion — to explore issues of faith that are not one-sided,” he said.

Lengthy interviews with Lee and Sixsmith convinced Coogan that the story “could be somehow uplifting despite the tragedy.” Veteran director Stephen Frears (“The Queen”) agreed, and was impressed by Coogan’s determination to spread his wings.

Their film, a delicate balance of drama and mischievous odd-couple humor, was runner-up to “12 Years a Slave” for top honors in the Toronto International Film Festival.

While Coogan didn’t want the film “to be like homework, I wanted it to be entertaining,” the story is a contemporary history lesson.

“In the character of Philomena, I saw the old generation,” he said. “The last of an old Ireland, an old kind of church,” buffeted by profound clerical scandals. While Philomena is a woman of humble faith, optimism and instinctive kindness, in Sixsmith he saw a character close to his own, a jaded liberal intellectual.

“I thought I could have fun with that. I didn’t want to do that thing of, ‘You can’t laugh at old Irish ladies.’ Because you can! It’s OK! Women of my grandmother’s generation would say things in a very simple way but they had an intuition about people that was very, very accurate. And far more concise than many well-read intellectuals. That can come off as simplistic, and funny, and sometimes incredibly incisive.”

Lee in reality “is not so daft” as Dench’s occasionally oblivious character, “but she’s very outgoing and wears her tragedy quite lightly on her shoulders. As a character in the film we make her a little more apparently naïve early on. We kind of want to lull the audience into making too swift a judgment.”

Coogan has played a number of real people, including Paul Raymond, the king of London’s Swinging Seventies nudie stage revues; Manchester post-punk music promoter Tony Wilson, and several versions of himself. His version of Sixsmith at the outset allowed Coogan an opportunity for the sort of self-flagellating comedy he has perfected.

“I think it’s important to always question your own thought processes,” he said. “It’s important to know that we are all fallible whether we are religious or not. The cynicism which he represents, I’m guilty of and I think many people are in this day and age. It’s a defensive position to take and it’s an easy position. But a lot of people crave authenticity, the notion of saying something they really believe in. They have values, but they’re self-conscious. They feel like if they put their hand up they’ll be ridiculed and mocked. Martin’s anger changes over the course of the film. In the end he’s angry because he cares about what’s happened to somebody else.”

It was precisely Sixsmith’s failings that made the character appealing to play, Coogan said. “There’s a book called ‘The Spirituality of Imperfection,’ ” by Ernest Kurtz and Katherine Ketcham, “that I’ve found really interesting. It’s about how it’s in our failings that we find out what it is to be human.” That’s where you find the truest compassion. And the best comedy.