al-Maghar was a Palestinian Arab village in the Ramle Subdistrict of Mandatory Palestine. It was depopulated by the Givati Brigade during Operation Barak on 18 May 1948. It was located 12 km southwest of Ramla, situated north of Wadi al-Maghar.
An inscription which was in Greek, and dated to a Christian period was found here.
In the 8th century, the village was the birthplace of the Islamic jurist Abu al-Hasan Muhammad al-Maghari.
In 1517, Al-Maghar, like the rest of Palestine, was incorporated into the Ottoman Empire, and in the 1596 tax registers the village appeared under the name of Imgar, as being in the nahiya (subdistrict) of Gaza under the Liwa of Gaza, with a population was 22 households, all Muslim. The villagers paid a fixed tax rate of 33,3% on various agricultural products, such as wheat, barley, summer crops, fruit trees, olive trees, and sesame; a total of 6,400 akçe.
In 1838, el Mughar was noted by Edward Robinson from