In 321 BC the Roman army was deceived into thinking Lucera was under siege by the Samnites. Hurrying to relieve their allies the army walked into an ambush and were defeated at the famous Battle of the Caudine Forks. The Samnites occupied Lucera but were thrown out after a revolt. The city sought Roman protection and in 320 BC was granted the status of Colonia Togata, which meant it was ruled by the Roman Senate. 2500 Romans moved to Lucera in order to strengthen the ties between the two cities. From then on Lucera was known as a steadfast supporter of Rome.
During the civil wars of the late Republic Pompey set up his headquarters in Lucera, but abandoned the city when Julius Caesar approached. Lucera quickly switched its allegiance and Caesar's clemency spared it from harm. In the next civil war between Octavian and Mark Anthony the city did not escape as lightly. After the war Octavian settled many veteran soldiers on the lands of the ruined city. This helped Lucera recover quickly and marked an era of renewed prosperity. Many of the surviving Roman landmarks hail from this Augustan period, among them the Luceran amphitheatre.
In 1224 AD, Holy Roman Emperor Frederick II, responding to religious uprisings in Sicily, expelled all Muslims from the island, transferring many to Lucera over the next two decades. In this controlled environment, they couldn't challenge royal authority and they benefited the crown in taxes and military service. Their numbers eventually reached between 15,000 and 20,000, leading Lucera to be called Lucaera Saracenorum because it represented the last stronghold of Islamic presence in Italy. Muslims in Lucera were predominately farmers. They grew durum wheat, barley, legumes, grapes and other fruits. Muslims also kept bees for honey.
The colony thrived for 75 years until it was sacked in 1300 by Christian forces under the command of Charles II of Naples. The city's Muslim inhabitants were exiled or sold into slavery, with many finding asylum in Albania across the Adriatic Sea. Their abandoned mosques were demolished, and churches were usually built in their place, including the cathedral S. Maria della Vittoria.
After the Muslims were removed from Lucera, Charles tried to settle Christians in the city. Those Muslims that converted to Christianity got part of their property back, but none was restored his former position of political or economic influence. As time progressed, grain production fell in the city, and in 1339 the city was hit by a famine. While Christians were allowed to farm as the Muslims, the loss of Muslim farmers may have been a cause of the famine.