Majdal Yaba stood on the site of a walled city in 3000 BCE, and is first mentioned as Aphek in the Ancient Egyptian Execration texts of the 19th century BCE, as well as the 15th century topographical list of Thutmose III. According to biblical tradition, the Israelites under Joshua conquered the city from the Canaanites who had established a monumental palace there. With the Philistines advancing toward the city, the Israelites fled towards the hills of Samaria, and Aphek became the northernmost locality in Philistia. The Philistine army assembled in Aphek for two major battles against the Israelites, including the slaughter of Saul and Jonathan on Mount Gilboa and the capture of the Ark of the Covenant (1066 BCE) (1 Samuel 4:1-12). From then on, the city is not mentioned in the Bible, but the Assyrians and the Babylonians mention it as a stronghold in the 7th century BCE.
King Herod, who ruled the region on behalf of the Roman Empire between 37-4 BCE, renamed the city Antipatris to commemorate his father Antipater, choosing the site because it was in the "loveliest of plains... with an abundance of rivers and trees." Antipatris became a major crossroads between the principal port city of Jaffa and Jerusalem. Saint Paul spent a night there when he was brought from Jerusalem to Caesarea (Acts 23:31). The city was devastated during the southern battles of the First Jewish-Roman War from 66-70 CE and did not recover until the 2nd century CE, but in 363 an earthquake leveled the city.
On 27 April 750, Abdullah ibn Ali, the Abbasid ruler Abu Al-Abbas as-Saffah's uncle, marched to Antipatris (Abu Futrus) on 25 June. He had invited 80 members of the Umayyad dynasty, whom the Abbasids were at war with, to the town with promises of fair surrender terms only to have them massacred. On 5 April 885, at the banks of the Auja River, Abu'l-Abbas ibn al-Muwaffaq fought against Khumarawayh ibn Ahmad ibn Tulun in the Battle of Tawahin ("The Mills"). Ibn al-Muwaffaq won this battle, forcing Khumarawayh to flee to Egypt. However, Ibn al-Muwaffaq's army lost a later engagement and he fled to Damascus.
In 975 the army of Egypt-based Fatimid caliph al-'Aziz defeated and imprisoned the Aleppo-based Hamdanid general Aftakin at Auja River, opposite the ruined castle of Majdal Yaba.
The Crusaders conquered the Levant from the Arab Muslims in 1099, and built a fortress on the site of Majdal Yaba in 1152, naming it Mirabel. The fort was held against Baldwin of Ibelin by Manasses of Hierges, but eventually fell to Baldwin who ruled it as an independent lordship of the Kingdom of Jerusalem from 1162 to 1171. In 1166, lands belonging to the fortress and the harvest of its fields were given to the Church of St. John the Baptist in Nablus.
The tyranny of a crusader lord Hugh of Ibelin in Majdal Yaba near Nablus was reported by Usama ibn Munqidh in 1156 CE; he imposed excessive taxes on Muslims, and required Muslims to pay four times as much tax as Christians nearby. The inhabitants of eight villages which included Ibn Qudamah family left their homes in 1156 AC and migrated to Damascus, where they founded Al-Salihiyah suburb.
In 1177, the Muslim Ayyubids under Saladin marched their army from south of Palestine northwards past Ascalon to the Castle of Mirabel which was being used to defend the road from Jaffa to Jerusalem. In July 1187, Saladin's younger brother, al-Adil I, conquered Mirabel, but did not destroy the castle fortress. According to E.G. Rey there existed among the ruins, 'the remains of a fine church of the 12th century', a claim repeated by T. A. Archer. Chronicler Baha ad-Din ibn Shaddad recorded that in 1191-92, Saladin used the castle fortress as a base for carrying out raids against the Crusaders, although he camped outside of it. However, Saladin gave orders to dismantle the walls of Mirabel after his defeat at the battle of Arsuf.
While under Ayyubid rule in 1226, Arab geographer Yaqut al-Hamawi mentions it as Majdal Yafa or "Tower of Jaffa", probably due to its proximity to the city of Jaffa. He says it was a village with a "formidable fort".
June 1240 CE marked the arrival of the English crusade led by Richard of Cornwall, brother of the King Henry III of England and brother-in-law of Emperor Frederick II. As-Salih Ayyub, King of Egypt, offered Richard of Cornwall a new treaty to be complementary to the earlier treaty held with Theobald IV, Count of Champagne, France. His offer this time included his readiness to recognize the legitimacy of the concessions made by his uncle and opponent as-Salih Ismail, King of Damascus, to the Crusaders, so that the Galilee, and Jaffa and Ashkelon, and all of the city of Jerusalem, including Bethlehem and Majdal Yaba, in addition to Tiberias, Safed, and Belvoir Castle and Al-Tur Castle, were all included in the Kingdom of Jerusalem.
In 1266, after the fall of Jaffa to the Mamluks, Sultan Baibars sent chiefs from Deir Ghassaneh to protect Majdal Yaba's tower. In the late 13th century, the castle fortress at Majdal Yafa was abandoned.
Majdal Yaba was apparently repopulated when Palestine was incorporated into the Ottoman Empire in the early 16th century, and by 1596, it was a small village in the nahiya ("subdistrict") of Jabal Qubal, part of Sanjak Nablus. It paid taxes on wheat, barley, beehives and goats. The population consisted of 8 Muslim families, an estimated total population of 44. The castle fortress in Majdal Yaba that was abandoned in the 13th century, was rebuilt in 18th to 19th centuries.
On March 3, 1799, General Kleber, Commander in Chief of the invading French forces, received the order to push detachments after having taken up position to the south of the river Nahar-al-Ougeh, to watch enemy movements, and to prepare for the army to march to Acre. He instructed General Damas (Lannes), on March 6, to undertake a reconnaissance in the mountains inhabited by the Naplousains, who seemed to be hostile. Turks were firing from behind rocks and down precipices. The small column was obliged to retreat with heavy losses where sixty Franks were killed and more than double the number wounded, and Damas's arm was broken.
In the 19th century, the village was named Majdal al-Sadiq after Sheikh Muhammad al-Sadiq al-Jamma'ini, the chief of the village who hailed from the prominent Rayyan clan. The Rayyan were a branch of the Bedouin Bani Ghazi tribe that emigrated to Palestine from Jordan in the 17th century. According to Eli Smith, in 1843, the fortress (known as the "Rayyan Fortress") in the village was in ruins.
On Thursday, November 7, 1850 James Finn future British Consul to Jerusalem and Palestine, visited the village and found it and the castle in a very dilapidated condition, he met Sheikh Al Sadiq family, and slept in the castle for a night, he surveyed the church attached to the castle and saw the Greek inscription upon the lintel signifying Martyr Memorial Church of the Holy Herald. On leaving Mejdal he descended to Ras el 'Ain ("head of the springs") at half an hour's distance, a site which he believed to be identical with the ancient city of Antipatris.
When Edward Robinson visited in 1852, he reported that the fortress had been rebuilt and also served as a palace for the ruling sheikh. Sheikh al-Sadiq, however, had been banished by the Ottomans. In the 1850s, the Rayyan controlled 22-25 villages in the nahiya of Jamma'in West in Sanjak Nablus, with Majdal Yaba being their main village, where they maintained a fortress and manor. During this time, however, they were embroiled in war with their rival clan, the Qasim — who controlled the Jamma'in East area and also belonged to the Bani Ghazi tribe.
In 1859, Sulayman Rayyan was in control of Majdal Yaba, and by 1860 the Rayyan clan had lost all of their influence in the sanjak after they were defeated by the Qasims. The Rayyan continued to live in and rule Majdal Yaba, but the village ceased to be a center of power. According to the Palestine Exploration Fund's Survey of Western Palestine (SWP), the Rayyan family were "ruined by the Turkish Government." Victor Guérin visited in 1870.
Members of SWP who visited in 1873 reported a large building of "massive masonry", probably a former church, with a side door inscribed in Greek "Memorial of Saint Cerycus". In 1882, the village was described as "A large and important village, evidently an ancient site, having ancient tombs and remains of a church. It stands on high ground above the plain, and contains a house or palace of large size for the Sheikh ; it was the seat of a famous family who ruled the neighbourhood. The water supply is from wells and cisterns.
In 1888, a school was founded in Majdal Yaba.
In the 1922 census of Palestine conducted by the British Mandate authorities, there were 726 inhabitants living in the village; 3 Jews and 723 Muslims, rising to 966, all Muslim, in a total of 227 houses in the 1931 census. The layout of the village resembled a parallelogram and its houses were built close together, being only separated by narrow alleys. They were built of mud and straw or stone and cement. Each neighborhood was inhabited by a single hamula ("clan") and contained a diwan for public meetings and receiving guests. The Rayyan family had still not recovered by the beginning of the Mandate Period; it was known to be impoverished, as was the Qasim family. "Dar az-zalimin kharab [the home of the oppressors is ruined]," said peasants when they passed by their kursis. In 1935, a mosque was built in Majdal Yaba and the Ottoman-built school had reopened in 1920, enrolling 147 students in the mid-1940s. There was also a clinic in the village. Agriculture was the basis of the economy, with farmers planting wheat, corn, barley, vegetables, and sesame. They also tended fruit orchards, particularly citrus. Artesian wells irrigated the fields.
In 1945 Majdal Yaba had a population of 1,520 Muslim inhabitants with a total of 26,332 dunams of land. Of this, a total of 2,481 dunums of village land was used for citrus and bananas, 110 dunams were plantations or irrigable land, 13,906 dunums were used for cereals, while 59 dunams were classified as built-up urban areas.
Majdal Yaba was in the territory allotted to the Arab state under the 1947 UN Partition Plan. During the war, it was occupied by the Second Battalion of the Alexandroni Brigade on July 12, 1948 in Operation Danny, after wresting it from the Iraqi Army who were defending the village during the 1948 Arab-Israeli War. The nearby village of Ras al-Ein, deserted in the 1920s, was also captured. The New York Times reported that the situation of the surrounded Iraqi troops was "hopeless". The capture of Majdal Yaba also led to the control of the hills lying to the north of the operation zone and the springs of the al-Auja river (Arabic: نهر العوجا). On August 28, 1948 The Iraqi forces attempted to recapture the village, but were asked to abandon the operation
The Israeli town of Rosh HaAyin — which today is a city — was built on village lands in 1950, and in 1953, the Jewish kibbutz of Givat HaShlosha was established on village lands. According to Palestinian historian Walid Khalidi, the Rayyan Fortress still "crowns the site" in addition to the tomb of Sheikh Muhammad Al-Sadiq, and a part of the village cemetery still remains. The fortress is "slowly crumbling" and the dome of the tomb is severely cracked.
In 1948, it had a projected population of 1,763. Palestinian refugees and their descendants numbered 10,828 in 1998.