Although modern cosmology is essentially a twentieth-century science, its birth can reasonably be traced back to discussions about the universe in the previous century. With the emergence of astrophysics in the 1860s astronomy was substantially changed and the material content of the universe became an issue of science. At about the same time thermodynamics was applied to the universe at large, with the result that the beginning and end of the universe entered astronomical thought. Moreover, it became slowly realized that space can be described as curved rather than flat. In that case it would be possible to speak about a finite and yet unbounded universe and in this way to solve some of the problems associated with the traditional view of an infinite number of stars. These and other problems were only fully understood in the twentieth century, but they were discussed before Einstein revolutionized cosmology.