Ancient Egyptian era Oxyrhynchus lies west of the main course of the
Nile on the
Bahr Yussef, a branch that terminates in
Lake Moeris and the
Faiyum oasis. In
ancient Egyptian times, there was a city on the site called
Per-Medjed, named after the
medjed, a species of
elephantfish of the Nile worshipped there as the fish that ate the penis of
Osiris. It was the capital of the 19th
Upper Egyptian
Nome.
Ptolemaic era After the conquest of
Egypt by
Alexander the Great in 332 BC, the city was reestablished as a Hellenistic town called
Oxyrrhynchoupolis (). In the
Hellenistic period, Oxyrhynchus was a prosperous regional capital, the third-largest city in
Egypt. After Egypt was
Christianized, it became famous for its many
churches and
monasteries.
Roman era Oxyrhynchus remained a prominent, though gradually declining, town in the
Roman and
Byzantine periods. The Roman suppression led to the near-total expulsion and destruction of Jewish communities in Egypt. Papyrological evidence indicates that a local festival commemorating the Jewish defeat was still celebrated in Oxyrhynchus some eighty years later. Jewish life in the area did not re-emerge until the third century, with a papyrus dated to 291 CE recording an active
synagogue in Oxyrhynchus and identifying one of its officials as originating from
Palestine. From 619 to 629, during the brief period of
Sasanian Egypt, three Greek papyri from Oxyrhynchus include references to large sums of gold that were to be sent to the emperor.
Arab era During the era of
Rashidun Caliphate, the town of Oxyrhinchus was invaded and conquered by
Rashidun army under the leadership of
Khalid ibn al-Walid. Various early Islamic chroniclers, such as
Al-Waqidi in his
F̣utūh al-Bahnasā, and Muhammad ibn Muhammad al-Mu"izz in
The Conquest of Bahnasa, reported that the Muslim armies under Khalid ibn al-Walid entered Bahnasa in 639, which defended by 50,000
Byzantine and Sudanese christian auxiliaries of
Beja, which reinforced by 1,300 elephant-riding mounted archers, and anti cavalry unit named
al-Quwwad which armed with iron sticks. These units was led by a
Patrician named Batlus. Meanwhile,
al-Maqqari even stated 50,000 christian army of Byzantine Sudanese christian alliance in the "Battle of Darishkur". Before the battle, the Rashidun army camped in a place which called
Dashur. 21st century Byzantine historian
Benjamin Hendrickx reported that the African christians has mustered around 20,000 Sudanese
Symmachoi corps a successor of
Foederati auxiliary troops in Roman empire that existed around 400-650 AD. the record of al-Maqrizi stated in this conflict,
Dhiraar ibn al-Azwar,
Miqdad ibn Aswad,
Zubayr ibn al-Awwam, and
Uqba ibn Amir each commanding muslims cavalry facing the Elephant corps led by Byzantine exarchate commander named Batlus. The Rashidun cavalry armed with spears ignited in flames that tip soaked in Santonin plants and Sulphur which were used drive the elephants flee in terror, as those elephants scared with the presence of the flaming tip of spear. while the elephant riders were toppled from the elephant's back and crushed underfoot on the ground. Meanwhile, the
al-Quwwad warriors who used iron staffs were routed by the Rashidun cavalry soldiers who seized chain weapons from their fellow
al-Quwwad units. Later, after they managed to defeat the Byzantine field army, the Rashidun forces besieged the city. There are two version about the siege, the first version narrated the siege was led by Khalid ibn al-Walid, who also brought an ex
Sassanid Marzban and his 2,000 Persian convert soldiers in this campaign. The
Persian Marzban suggested to Khalid to form a suicide squad who will carry a wooden box filled with mixture of sulphur and
oil and placing it at the gates, ignited it and blasting the gates(or melting the iron gate, according to the original translation), allowing the Muslim army to enter the city. The second version were the Muslim army led by Qays ibn Harith without much details of how the Muslims managed to subdue the city. However, this source mention that Qays ibn Harith name were used temporarily to rename Oxyrhynchus for while to honor his deeds in this campaign, before being renamed to be al-Bahnasa. From that point on, the town's name was changed to Al-Bahnasa. The town subsequently contained a cemetery of 5,000
companions of the Islamic prophet Muhammad who had participated in the conquest of Oxyrhynchus. as the city was known for having 5,000
Sahaba buried in it. The large number of fallen Muslim soldiers buried in this city was due to major battles against the Roman army and their fortifications in this area. Before it was renamed as "al-Bahnasa", Oxyrynchus were renamed as "Al-Qays town", by
Maqrizi or "town of martyrs" in honor to one of the Muslim commander that participated in the conquest of Oxyrynchus.
Ali Pasha Mubarak mentioned it in the compromise plans that it was a city that had great fame and its flat was about 1000 acres and the golden curtains were working and the length of the curtains was 30 cubits and its territory included 120 villages other than the plantations and the hamlets. The northern is Kandous, the western is the mountain, the tribal is Touma, and the eastern is the sea. Each gate had three towers, and there were forty ribats, palaces, and many mosques, and at its western end there is a famous place known as the Dome of Seven Maidens. Among the most notable tombs were allegedly belong to the Muslim martyrs were the tombs of the children of Aqil bin Ali bin Abi Talib (brother of
Ali, fourth
Rashidun Caliph), Ziyad bin Abi Sufyan bin Abdul Muttalib (son of
Abu Sufyan ibn Harb),
Aban ibn Uthman bin Affan, Muhammad ibn Abi Abd al-Rahman bin Abi Bakr al-Siddiq (grandson of
Abu Bakar), and Hassan al-Salih ibn Zayn al-Abidin bin al-Hussein (great-grandson of Ali).
Ibn Taghribirdi, a
Mamluk era historian, also writing the history of Bahnasa conquest in his book, ''Al Duhur fi madaa al 'Ayaam wa al shuhur'' The Muslims army settled in the town for three years as their base after the conquest, while launching occasional raids on the black and the coasts. Al-Qa`qa` bin Amr, Hashem,
Abu Ayyub al-Ansari and
Uqba ibn Nafi Al-Fihri, the future conqueror of Maghreb, and went with two thousand of Persians convert who now fight under the caliphate, and raided the border of
Barqa. Other examples include the tomb of Sidi Fath al-Bab, the mosque of Sidi Ali al-Jamam, and a large cemetery in which many people that participated in the
Arab conquest of Egypt are buried. There are also many domes in Bahnasa which are attributed to soldiers such as Muhammad bin Uqbah bin Amer Al-Juhani and Ubadah bin Al-Samit. There was also a particular mosque called Dome of Seven Maidens, which allegedly was built to honor seven Oxyrhynchus
Coptic girls who defected and helped the Muslim armies under '
Amr ibn al-As and now venerated for their effort in the conquest of the city. As the town of al-Bahnasa now contained thousands of historical structures in memoir of the conquests, including the 5,000 graves of
companions of the prophet and
Tabi'un martyrs of the battle of Bahnasa, the town are regarded by locals as "
al-Baqi' of Egypt", which became the point of interest for many foreign tourists particularly from the Muslim majority country. ==Archaeological excavation==