Mr. Fry, who rose to fame in part through his portrayal of the outspoken 19th-century Irish writer Oscar Wilde, who had legal troubles of his own, declined to comment on the investigation, according to his representative, Christian Hodell.

Eoin Daly, a lecturer in law at the National University of Ireland, Galway, said Mr. Fry was never in any real danger of prosecution. He said the law was introduced in 2009 only because the country’s 1937 constitution required the country to have a blasphemy law, and an earlier one had been struck down in the courts.

Lawmakers did their best to make the 2009 law “almost unenforceable,” with broad exemptions to protect free speech, Mr. Daly said. “There was a constitutional obligation to legislate this offense, but it was not against the constitution to create an offense that was of no use.”

The Catholic Church has had profound cultural and political influence in Ireland, but adherence to its teachings has been waning in recent years. There are several continuing controversies in Ireland over the role of religion in public life, Mr. Daly noted, and Mr. Fry’s brush with the blasphemy law is probably the least urgent.

Ireland became the first country to legalize same-sex marriage by popular vote in 2015. Since then, it has been locked in a tense debate over abortion, which was banned in almost all cases by a 1982 referendum. Activists say thousands of Irish women leave the country for abortions each year.

The country has also experienced a string of scandals related to the Catholic Church’s role in managing public services, including the discovery of a mass grave on the site of a former publicly financed home for unwed mothers run by a religious order, the Sisters of Bon Secours.

“There has been a huge transformation of public opinion away from the orthodox Catholic positions over the last quarter of a century, but you still have significant church involvement in public services, especially education,” Mr. Daly said. “You could say the church has an outsize institutional role, considering the public opinion, values and beliefs in society.”