From ancient history we have evidence of swimming in Stone Ages (i.e. 3000,000 through 6000 BC to 2500 BC). Among them there are pictures in "the swimmers cave" near Wadi Sora in the southwest of Egypt near Libya, an Egyptian clay plate created between 4000 B.C. and 9000 B.C. showing four swimmers, bas-reliefs from Babylon and wall drawings from Assyria depicting an ancient breaststroke. Swimming pools and baths in Asia, namely in India and Crete, survived from ancient history till nowadays.
We know about swimmers of Hittites, Minoans, and other civilizations in the Middle East and American Mayan swimmers in the Tepantitla House and many more. Written references include the Odyssey, the Iliad, the Bible (Acts 27:42, Ezekiel 47:5, Isaiah 25:11), etc. Swimming as a kind of sports was quite popular with ancient Greeks and swimming pools were common. A Greek saying "you can neither swim nor run" was regarded as an insult. Julius Caesar was also known as a good swimmer and swimming as a military skill was considered an asset.
According to Herodotus, at the Battle near Salamis, the Persians suffered from many more heavy casualties than the Greeks because the Persians did not know how to swim and drowned after their ships had been destroyed.
In Japan, swimming was one of the Samurai's skills, and in ancient history, the first known swimming races were organized by Japanese emperor Suigui in 36 B.C.
In German ancient history swimming is mentioned as being successfully used in wars against the Romans and swimming competitions were also known at that time.
Swimming in Middle Ages used to be one of the seven agilities the knights must learn, especially swimming with armor.
The Middle Ages are marked with the appearance of several teaching books about swimming. The first book about swimming "Colymbetes" was written in1538 by German professor of linguistics Nicolas Wynman and almost simultaneously a similar book by E. Digby was written in England. In 1696, in France and England was published "The Art of Swimming" by Melchisedech Thevenot which became a standard reference to swimming. In 1794, in Italy a book about swimming (in two volumes) by Kanonikus Oronzio Bernardi was published. And in 1794 in Germany "Kleines Lehrbuch der Schwimmkunst zum Selbstunterricht " (Little textbook about swimming art), which contained extensive recommendations about teaching swimming, was also published.
The primary goal of such books was teaching people, especially children, swimming and propagation of various swimming techniques and styles. Another way to achieve such an aim was the organization of national swimming organizations and lifesaving groups.
In Japan in 1603, the first national swimming organization endorsed by emperor Go-Yozei was established. In 1708, in China the first known lifesaving group "Chinkiang Association for the Saving of Life" was established and then lifesaving groups was created in Amsterdam (1767), in the United States (1768), in Copenhagen (1772), in Great Britain (1774) and in Sweden (1796).
However, by the end of the Middle Ages and until the introduction of bathing suits, swimming was less popular, as a demonstration of public nudity was prohibited by the church.