Until the early 20th century, Aqir was thought to lie at the site of the ancient Philistine city of Ekron, that has now been identified as Tel Mikne, 9 km to the south. The error seems rooted in antiquity; The Romans referred to the village as Accaron.
Archeological excavations indicate that a pottery workshop operated there during the Roman era, and a glass workshop was there during the Byzantine era. Buildings from the Abbasid era have also been excavated.
In the 10th century, Al-Muqaddasi writes of Aqir (Ekron) as "A large village with a mosque. Its inhabitants are much given to good works. The bread here is not to be surpassed for quality. The village lies on the high road from Ar-Ramlah to Makka."Yakut called it Al Akir, and said it belonged to Ar Ramlah.
The village mosque had a construction text, made in naskhi script, and dating it to 1296–7.
In 1596, Aqir (Amir) appeared in Ottomantax registers as being in the Nahiya of Ramla of the Liwa of Gaza. It had a population of 31 Muslim households and paid taxes on wheat, barley, and other produce.
The mihrab in the mosque had an inscription above it dating it to 1701-1702 CE.
The scholar Edward Robinson passed by the village in 1838, and described it as being surrounded by "well-tilled gardens and fields of the richest soil". The village itself was described as being of "considerable size", built of bricks or adobe. It was further noted that it was a Muslim village, located in the Ramleh region.
In 1863 Victor Guérin noted Aqir as a large village, with 800 inhabitants. An Ottoman village list from about 1870 counted 155 houses and a population of 512, though the population count included men only.
Between 1941 and 1948, the RAF Aqir airfield was located nearby. In 1945, the village had a population of 2,480 Muslims with two elementary schools: one for boys, founded in 1921 which had an enrollment of 391 boys in 1945 and a second for girls, which had an enrollment of 46 girls in 1945. There were two mosques in the village.
In the 1945 statistics, the village had 1,300 dunums of land used for citrus and banana cultivation, 8,968 dunums were used for cereals, 914 dunums irrigated or used for orchards, while 46 dunams were classified as built-up public areas.
According to the Palestinian historian Walid Khalidi, the village's remaining structures on the village land were, in 1992:
A number of small houses remain, several of which are occupied by Jewish families. One is a cement house with a gabled roof and rectangular doors and windows, another is similar in its features, but its roof is flat. Cypresses, cycamores and cactuses grow on the site. The surrounding lands are cultivated by Israelis.
^Seymour Gitin and Trude Dothan (1987). "The Rise and Fall of Ekron of the Philistines: Recent Excavations at an Urban Border Site". The Biblical Archaeologist. 50 (4): 197–222. doi:10.2307/3210048. JSTOR3210048. S2CID165410578.