History of geometry
Classic geometry was focused in compass and straightedge constructions. Geometry was revolutionized by Euclid, who introduced mathematical rigor and the axiomatic method still in use today. His book, "The Elements" is widely considered the most influential textbook of all time, and was known to all educated people in the West until the middle of the 20th century.
Foundations of geometry
Apparently the first to do so was G. S. Klügel (1739–1812), a doctoral student at the University of Gottingen, with the support of his teacher A. G. Kästner, in the former's 1763 dissertation "Conatuum praecipuorum theoriam parallelarum demonstrandi recensio" (Review of the Most Celebrated Attempts at Demonstrating the Theory of Parallels). In this work Klügel examined 28 attempts to prove Postulate 5 (including Saccheri's), found them all deficient, and offered the opinion that Postulate 5 is unprovable and is supported solely by the judgment of our senses.
The beginning of the 19th century would finally witness decisive steps in the creation of non-Euclidean geometry. Circa 1813, Carl Friedrich Gauss and independently around 1818, the German professor of law Ferdinand Karl Schweikart had the germinal ideas of non-Euclidean geometry worked out, but neither published any results. Then, around 1830, the Hungarian mathematician János Bolyai and the Russian mathematician Nikolai Ivanovich Lobachevsky separately published treatises on what we today call hyperbolic geometry. Consequently, hyperbolic geometry has been called Bolyai-Lobachevskian geometry, as both mathematicians, independent of each other, are the basic authors of non-Euclidean geometry. Gauss mentioned to Bolyai's father, when shown the younger Bolyai's work, that he had developed such a geometry several years before, though he did not publish. While Lobachevsky created a non-Euclidean geometry by negating the parallel postulate, Bolyai worked out a geometry where both the Euclidean and the hyperbolic geometry are possible depending on a parameter "k". Bolyai ends his work by mentioning that it is not possible to decide through mathematical reasoning alone if the geometry of the physical universe is Euclidean or non-Euclidean; this is a task for the physical sciences. 
The independence of the parallel postulate from Euclid's other axioms was finally demonstrated by Eugenio Beltrami in 1868.