Homs did not emerge into the historical record until the 1st century BCE at the time of the Seleucids. It later became the capital of a kingdom ruled by the Emesene dynasty who gave the city its name. Originally a center of worship for the sun god El-Gabal, it later gained importance in Christianity under the Byzantines. Homs was conquered by the Muslims in the 7th century and made capital of a district that bore its current name. Throughout the Islamic era, Muslim dynasties contending for control of Syria sought after Homs due to the city's strategic position in the area. Homs began to decline under the Ottomans and only in the 19th century did the city regain its economic importance when its cotton industry boomed. During French Mandate rule, the city became a center of insurrection and, after independence in 1946, a center of Baathist resistance to the first Syrian governments. During the Syrian civil war, much of the city was devastated due to the Siege of Homs; reconstruction to affected parts of the city is underway with major reconstruction beginning in 2018.