Galileo Galilei's Letter to Benedetto Castelli (1613) was his first statement on the authority of scripture and the Catholic Church in matters of scientific enquiry.:66 In a series of bold and innovative arguments, he undermined the claims for Biblical authority which the opponents of Copernicus used. The letter was the subject of the first complaint about Galileo to the Inquisition in 1615.:66
In 1610 Galileo had published Sidereus Nuncius (The Starry Messenger) which made him famous across Europe. This work prompted many debates as to whether the Earth really was the centre of the universe.:27 Galileo usually avoided referring to scripture in his arguments about the universe, while the Aristotelian scholars who opposed Copernicus cited the Bible in support of their views - for example Lodovico delle Colombe in his 1611 work Contra il Moto della Terra (Against the Motion of the Earth) explicitly challenged anyone defending Copernicus to answer the charge that he was going against what the Bible taught.
This presented Galileo with a dilemma - if he did not respond, he effectively conceded that the biblical text confirmed the Aristotelian view despite the fact that the Church had no firm position on the Copernican question; on the other hand if he tried to engage in arguments based on scripture, he allowed himself to be drawn into a field where the Church regarded its authority as absolute.:59-61 Indeed an earlier venture into this form of argument by Galileo had been stopped by the Church. In the manuscript for Letters on Sunspots (1613), he argued that "flaws" in the Sun demonstrated that the heavens were not immutable, as had previously been thought. A paragraph in which Galileo supported this by claiming that the scriptures supported the mutability of the heavens was removed by the Inquisition censors.:58-59
On 14 December 1613 Galileo's friend and former pupil Benedetto Castelli wrote to him to say that at a recent dinner in Pisa with the Grand Duke Cosimo II de' Medici a conversation had taken place in which Cosimo Boscaglia, a professor of philosophy, argued that the motion of the Earth could not be true, as it was contrary to the Bible. Castelli had disagreed with him and maintained, as Galileo held, that the Earth's motion was possible. After the dinner, Castelli had been called back by the Dowager Duchess Christina of Tuscany to answer points she raised from scriptural arguments against the motion of the Earth. Castelli had responded and Boscaglia had remained silent. Castelli wished to alert Galileo to this exchange, and advised Galileo that their mutual friend Niccolò Arrighetti would come to Florence and explain matters further. This Arrighetti did.:57
Galileo felt that it was important for him to set out an argument to show how scripture could not be used as the basis for scientific enquiry.:27 He did so with great speed, replying with a letter to Castelli in less than a week, on 21 December 1613. His Letter to Benedetto Castelli was not published, but was circulated widely in manuscript form.:66 As the debate about its arguments continued, Galileo thought it advisable to review and expand the arguments he had set out. This was the basis of his subsequent Letter to the Grand Duchess Christina, which expanded the eight pages of his letter to Castelli to forty pages.:29
In his letter to Benedetto Castelli, Galileo argues that using the Bible as evidence against the Copernican system involves three key errors. Firstly, claiming that the Bible shows the Earth to be static and concluding that the Earth therefore does not move is arguing from a false premise; whether the Earth moves or not is a thing which must be demonstrated (or not) through scientific enquiry. Secondly, the Bible is not even a source of authority on this kind of question, but only on matters of faith - thus if the Bible happens to say something about a natural phenomenon, this is not sufficient for us to say that it is so. Thirdly, he shows by deft argument that it is open to question whether the Bible, as his opponents claimed, even contradicted Copernicus' model of the universe. Indeed, Galileo argues, a key passage in the Bible which was held by his opponents to support the view that the Sun moves round the Earth supports his own views much better.:28
In the Bible Joshua 10:12 is an account of how God commanded the Sun to stand still so that Joshua could defeat his enemies. According to those opposed to Copernicus, this showed clearly that the Sun (and not the Earth) moved. Galileo argued that this passage could not be used to support the traditional Earth-centred view of the universe at all. If we assume the universe to be as it was described by Claudius Ptolemy, the Sun's annual motion was a slow movement towards the East, so if God had commanded it to stop, the daily movement towards the West would no longer have been counteracted and as a result the day would actually have got slightly shorter rather than longer. However if we assume the universe to be as Copernicus described it, the Sun is at the centre and its rotation drives the rotation of all the planets. Thus if God had ordered the Sun to stop turning, everything would have stopped and the day would have been longer, just as the Bible described.:68
Two aspects of Galileo's letter are particularly worthy of note. First, his boldness in venturing into the field of exegesis, where he was bound to upset many theologians who would not welcome his contributions. Second, his rhetorically brilliant argument was based on a fundamental contradiction; he began by arguing that faith and science were distinct, and that the Bible could not be used as the basis for arguments about science; he then went on to show, according to some novel and clever arguments, that actually the Bible supported his own scientific views.
His letter argues a position on scriptural authority which is very similar in substance, if not in tone, to that set out set out by the Catholic Church itself centuries later, in Leo XIII's 1893 encyclical, Providentissimus Deus. Emphasising that the Bible makes use of figurative language and is not meant to teach science, this argues:
"...here is the rule also laid down by St. Augustine, for the theologian: "Whatever they [i.e. scientists] can really demonstrate to be true of physical nature, we [i.e. theologians] must show to be capable of reconciliation with our Scriptures; and whatever they assert in their treatises which is contrary to these Scriptures of ours, that is to Catholic faith, we must either prove it as well as we can to be entirely false, or at all events we must, without the smallest hesitation, believe it to be so." 
Likewise, Galileo accepted that the Bible was infallible in matters of doctrine, but he agreed with Cardinal Baronius's observation that it was "intended to teach us how to go to heaven, not how the heavens go." He also pointed out that both St. Augustine and St. Thomas Aquinas had taught that scripture had not been written to teach a system of astronomy, citing St. Augustine's comment that "One does not read in the Gospel that the Lord said: I will send you the Paraclete who will teach you about the course of the sun and moon. For He willed to make them Christians, not mathematicians."
In late 1614 or early 1615, Niccolò Lorini obtained a copy of Galileo's letter, some parts of which he and his fellow Dominicans at the convent of San Marco in Florence adjudged to be "suspect or rash". He therefore forwarded it to Cardinal Paolo Emilio Sfondrati at the Congregation of the Index, together with a covering letter dated 7 February 1615, calling for the matter to be investigated.:70
The Holy Office examined Lorini's copy of Galileo's letter to Castelli on 25 February 1615 at the house of Robert Bellarmine.:61 It was clear to them that Lorini's version was not the complete letter, as it was obvious that an introductory section was missing.:71 (Lorini's version also included the phrase 'Scripture does not refrain from perverting its most important dogmas...' whereas Galileo's original had said 'Scripture accommodates itself to the capacity of uncouth and uneducated people').:197 For whatever reason, the Holy Office wished to make certain that it had an accurate version before proceeding with its investigation, so Cardinal Garzia Mellini, secretary of the Inquisition, wrote to the archbishop of Pisa, where Castelli taught at the university, and asked him to provide the original letter.:70
By now Galileo had apparently realised that some kind of investigation was underway, so he asked Castelli to return the original of the letter to him. He made a copy of it and sent this version to his friend Archbishop Piero Dini in Rome, protesting at the "wickedness and ignorance" of his enemies, and expressing concern that the Inquisition "may be in part deceived by this fraud which is going around under the cloak of zeal and charity".
The Holy Office submitted Galileo's letter to an unnamed theological adviser for examination. That adviser's report, undated, concluded that there were three places where Galileo had used language which was offensive, but 'although this document sometimes uses words improperly, it does not deviate from the narrow path of Catholic expression.':72
Until 2018 two versions existed of the Letter to Bedenetto Castelli - the Lorini version held in the Vatican archives and the Dini version. The general scholarly view was that Lorini's version was not authentic and that Lorini had amended it to show Galileo in the worst possible light, while the Dini version was generally held to be true.
In August 2018 the original manuscript of the letter was discovered in the archives of the Royal Society. This is the letter Galileo sent to Castelli and later asked Castelli to return to him. It shows the edits Galileo made in his own handwriting as he prepared the Dini version, replacing words and phrases that the Inquisition might object to with words less likely to offend. None of the arguments were changed, but the tone of the letter was altered considerably.
It is thus certain that the Lorini version was in most respects authentic, while the Dini version was not, as Galileo claimed, a true copy of his original letter.