This is the first investigation of one of the main interests of astronomy in Islamic civilization, namely, timekeeping by the sun and stars and the regulation of the astronomically-defined times of Muslim prayer. The study is based on over 500 medieval astronomical manuscripts first identified by the author, now preserved in libraries all over the world and originally from the entire Islamic world from the Maghrib to Central Asia and the Yemen. The materials presented provide new insights into the early development of the prayer ritual in Islam. They also call into question the popular notion that religion could not inspire serious scientific activity. Only one of the hundreds of astronomical tables discussed here was known in medieval Europe, which is one reason why the entire corpus has remained unknown until the present. The second and third volume deal with astronomical instruments for timekeeping and other computing devices. (Complete set: includes volume 1 and volume 2 in 2 parts).