The cathedral at Noyon was where Charlemagne was crowned as co-King of the Franks in 768,[7] as was the first Capetian king, Hugh Capet in 987.[8] In 859 the town was attacked by Vikings[9] and the bishop, Immo, captured and killed.[10] The town received a communal charter in 1108, which was later confirmed by Philip Augustus in 1223. In the twelfth century, the diocese of Noyon was raised to an ecclesiastical duchy in the peerage of France. The Romanesque cathedral was destroyed by fire in 1131, but soon replaced by the present cathedral, Notre-Dame de Noyon, constructed between 1145 and 1235, one of the earliest examples of Gothic architecture in France.