From Galileo to genetics, the Roman Catholic Church has danced with science, sometimes in a high-tension tango but more often in a supportive waltz. Pope Francis is about to introduce a new twist: global warming.

The field of genetics was started by a Catholic cleric, Gregor Mendel. Entire aspects of astronomy, including the genesis of the Big Bang theory, began with members of the Catholic clergy. While some religions reject evolution, Catholicism has said for 65 years that it fits with the story of creation.

But when lay people think of the church and science, one thing usually comes to mind: The prosecution of Galileo Galilei for heresy because he insisted that the Earth circled the sun and not the other way around.

The Catholic Church "has got an uneven and not always congenial relationship with science," said science historian John Heilbron, who wrote a biography of Galileo. But after ticking off some of the advances in science that the church sponsored, the retired University of California Berkeley professor emeritus added, "probably on balance, the Catholic Church's exchange with what we call science is pretty good."

The Catholic Church teaches that science and faith are not contradictory and even work well together. After lukewarm opposition to the theory of evolution in the late 19th century, the church has embraced that field of science that other faiths do not. There are remaining clashes about the ethics of scientific and medical practices — such as abortion and using stems cells from embryos — but that's more about morality than reality of science.

"The Big Bang, which nowadays is posited as the origin of the world, does not contradict the divine act of creating, but rather requires it," Pope Francis said last October, echoing comments made by his predecessors. "The evolution of nature does not contrast with the notion of creation, as evolution presupposes the creation of beings that evolve."

With that complicated history looming, Pope Francis, once a chemist, will soon issue an authoritative church document laying out the moral justification for fighting global warming, especially for the world's poorest billions.

Veerabhadran Ramanathan, a Scripps Institution of Oceanography climate scientist, briefed the pope on climate change. He said scientists felt they were failing in getting the world to understand the moral hazard that man-made warming presents. Now, he said, scientists who don't often turn to religion are looking forward to the pope's statement.

"Science and religion doesn't mix, but environment is an exception where science and religion say the same thing," Ramanathan said. "I think we have found a common ground."

The church found little such common ground with Galileo 382 years ago.

"Everything you know (about Galileo) is wrong but the truth unfortunately doesn't make the church look any better," said Brother Guy Consolmagno, an astronomer and president of the Vatican Observatory Foundation in Arizona.

Galileo was put under house arrest for the rest of his life after he continued to publish work showing the Earth orbiting the sun, despite warnings from the pope and the Inquisition. But it was more than a theological issue, said Heilbron and University of Illinois science historian Ron Numbers.

It was partially a personality conflict between Galileo and Pope Urban VIII, former friends. The pontiff felt betrayed personally by the astronomer because Galileo had promised to include in a postscript the pope's philosophy that contradicted Galileo's work, Heilbron said. Galileo didn't. And it was also about geopolitics, because the church was trying to fight back against the Protestant Reformation and felt the need to show that it would not permit dissent, he said.

Galileo wasn't sent to prison and "he had his meals catered from the Tuscan embassy so he didn't have to eat Inquisition food," said Numbers, editor of the book "Galileo Goes to Jail and Other Myths about Science and Religion."

That past had receded until the mid-19th century when in the United States, several books on the conflict between religion and science cited Galileo's experience to make the church look bad, said Numbers, the grandson of a president of the Seventh-day Adventist Church.

Now politicians and others who reject mainstream climate science, like Sen. Ted Cruz, R-Texas, compare themselves to Galileo because scientists scorn them. In fact, Galileo was persecuted for espousing science, not denying it, said Harvard University science historian Naomi Oreskes.

For centuries before and after Galileo, the Catholic Church was the main supporter of astronomy, often using the rooftops of churches to study the heavens.

"The church has promoted science in different ways. Thanks to Galileo we are here," said the Rev. Jose Funes, director of the Vatican Observatory in Italy. "Thanks to the Catholic Church, Galileo exists because he was a Catholic, a good Catholic."

The pioneer of solar astronomy, Angelo Secchi, was an Italian priest who observed the sun and planets from a telescope on a church roof, Consolmagno said. The man who came up with the idea of the Big Bang theory, Georges Lemaitre, was a Belgian priest. The then-pope, Pius XII, didn't squelch the Big Bang theory, but wanted to adopt it as proof of God's handiwork.

Lemaitre convinced him to dial it back. Science evolves, he said, and was not an immutable underpinning for church doctrine, Numbers said.

The Vatican even has a science academy.

"Our job in principle is to follow scientific developments closely and then inform on particular occasions the Vatican about new development," said the academy's president, Nobel Prize-winning microbiologist Werner Arber. He is a Protestant and academy members include non-Catholics, like Ramanathan, and even atheist Stephen Hawking.

For Consolmagno, astronomer and cleric, that's no big deal: "If you believe in truth, you are worshipping the same God as I am."

__

Online:

The Pontifical Academy of Sciences: http://www.casinapioiv.va/content/accademia/en.html

___

Seth Borenstein can be followed at http://twitter.com/borenbears