In the year 1844, Spanish authorities established local government units on the northern part of Cebu starting from what is now known as the town of Compostela as far north as what is now called the town of Borbon. Compostela was among the early barrios of the Danao. The newly established barrio was named Compostela on the suggestion of a Roman Catholic friar who came from the town of Compostela in Spain and brought along with him the image of that town's patron saint, Santiago de Apostol. Adopting Senor Santiago de Apostol as the parish patron saint, a parish chapel was built from light materials. As the population grew, the Spanish church authorities decided to elevate the chapel into a church so that in the year 1866 the catholic church was constructed on the same site. Up to present time, the same structure continues to be the major place of worship in Compostela.
At the turn of the 20th century, the Americans gained control over the Philippines when they defeated the Spaniards in the Battle of Manila Bay. As a consequence, the Treaty of Paris caused the reorganization and reclassification of all local government units in the country according to their population and income. The reorganization which took place in 1903 resulted in the secession of Compostela to Liloan. In 1919, Compostela became a municipality.
In 1942, the Japanese Imperial forces entered and occupied the town of Compostela.
During the Battle of Guila-Guila on 5 mar 1943, guerillas and male civilians organized as the soldiers and officers of the 8th Infantry Division of the Philippine CommonwealthArmy and its subordinate units the several Infantry Regiments, Field Artillery Regiments and many others and supporting of the local troops and officers of the PCA 3rd, 8th, 82nd, 85th, 86th and 87th Infantry Division and the local Cebuano resistance groups fought the Japanese. This battle, commanded by Major Fabian Sanchez, resulted in numerous casualties to the Imperial Japanese Army led by GeneralSōsaku Suzuki.
(Administratively independent from the province but grouped under Cebu by the Philippine Statistics Authority. Mandaue is grouped under the 6th legislative district of Cebu but still independent from the province.)