It was conquered many times in the course of its history, by the Abbasids, the Ikhshidids, the Fatimids, the Seljuqs, the Crusaders, the Mameluks, the Turks, the British, and the Israelis. After an outbreak of the Black Death in 1347, which greatly reduced the population, an order of Franciscan monks established a presence in the city. Under Arab and Ottoman rule the city became an important trade center. Napoleon's French Army occupied it in 1799 on its way to Acre.
The town had an Arab majority before most of its Arab inhabitants were expelled or fled during the 1948 Arab–Israeli War. The town was subsequently repopulated by Jewish immigrants. In 2001, 80% of the population were Jewish and 20% Arab (16% Arab Muslims and 4% Arab Christians).
In recent years, attempts have been made to develop and beautify the city, which has been plagued by neglect, financial problems and a negative public image. New shopping malls and public parks have been built, and a municipal museum opened in 2001.
A 2013 Israeli police report documented that the Central District ranks fourth among Israel's seven districts in terms of drug-related arrests. Today, five prisons are located in Ramla, including the maximum-security Ayalon Prison.
According to the 9th-century Arab geographer Ya'qubi, ar-Ramleh (Ramla) was founded in 716 by the governor of the Ummayad District of Palestine (Jund Filastin), Sulayman ibn Abd al-Malik, brother and successor of Caliph Walid I. Its name was derived from the Arabic word raml (رمل), meaning sand. The name of La Rambla, a major street of Barcelona, is ultimately derived from the same linguistic origin. The early residents came from nearby Ludd (Lydda, Lod). Ramla flourished as the capital of Jund Filastin, which was one of the five districts of the Syrian province of the Ummayad and Abbasid empires.