Discussions surrounding the nature of the infinite in mathematics have been under way for two millennia. Mathematicians, philosophers, and theologians have all taken part. The basic question has been whether the infinite exists only in potential or whether it exists in actuality. Only at the end of the 19th century a set theory was created that works with the actual infinite. Initially this theory was rejected by other mathematicians. The creator behind the theory, the German mathematician Georg Cantor, felt all the more the need to challenge the long tradition that only recognised potential infinite. In this he received strong support from the interest among German neothomist philosophers, who, under the influence of the Encyclical of Pope Leo XIII, Aeterni Patris, began to take an interest in Cantor’s work. Gradually his theory even acquired approval from the Vatican theologians. Cantor was able to firmly defend his work and at the turn of the 20th century he succeeded in gaining its acceptance. The storm that had accompanied its original rejection now accompanied its acceptance. The theory became the basis on which modern mathematics were and are still founded, even though the majority of mathematicians know nothing of its originally theological justification. Set theory, which today rests on an axiomatic foundation, no longer poses the question of the existence of actual infinite sets. The answer is expressed in its basic axiom: natural numbers make up an infinite set. No substantiation has been discovered other than Cantor’s: the set of all natural numbers exists from eternity as an idea in God’s intellect.