Courtelary is first mentioned in 968 as Curtis Alerici in a list of the properties of Moutier-Grandval Abbey.
 In 1179, Pope Alexander III elevated the Abbot to a Canon and confirmed the Abbots title to Courtelary.

In addition to Moutier-Granval Abbey, the Cathedral chapter of Saint-Imier owned properties in the village which were managed for them by the Lords of Fenis-Neuchâtel.
 However, while under the control of the Lords of Fenis-Neuchâtel, the valley became a bailiwick of the Prince-Bishop of Basel.
 The Prince-Bishop placed the valley under the Seigniory of Erguel.
 By the late 13th century, Seigniory was controlled by the town of Biel.

Due to the rising popularity of the cult of St. Imerius, in the 10th or 11th century a small Church of St. Imerius was built in the village.
 The original building was expanded in 1372, 1642 and finally in 1773.
 During a restoration in 1933-36, several 11th century murals were discovered in the building.
 The Courtelary parish was first mentioned in the 13th century.
 In 1530, Biel began forcing the entire Erguel region to accept the Protestant Reformation.
 This interference in local affairs pushed the residents of the valley to create an alliance with the town of Solothurn.
 In 1604 with Solothurn's support, the appeals court moved from Biel to Courtelary which brought limited self-rule back to the valley.
 Two years later the seat of the Erguel Bailiwick moved to Courtelary's New Castle (which later became the town hall).
 During the Thirty Years' War, in 1639, the village was plundered and partially burned by the Duke of Saxe-Weimar's troops.

In 1726, the Prince-Bishop of Basel, Johann Konrad von Reinach-Hirzbach, attempted to modernize and consolidate his extensive land holdings.
 He tried to sweep away the numerous local laws, customs and rights and replace them with a central government ruled according to the principles of enlightened absolutism.
 Riots and revolts against the new government broke out almost immediately in the Erguel valley and the region remained a center of anti-government activity.
 In 1733 a meeting at the Courtelary Castle exploded into a riot and the Prince-Bishop's bailiff, Benoît-Aimé Mestrezat, was forced to flee the city.
 In 1792 and 1793, heavily influenced by the French Revolution, the revolutionary National Assembly of Erguel was established in Courtelary.
 Revolutionaries flocked to the town and established a short-lived Republic of Erguel.
 In 1797 the French invaded the lands of the Bishop of Basel and established the Canton of Courtelary with Courtelary as the capital.
 The Canton was initially part of the Department of Mont-Terrible followed by the Department of Haut-Rhin.
 After Napoleon's defeat, in 1815, the Erguel region became part of the Canton of Bern.
 Courtelary was the capital of the District of Erguel until 1831 when it became the capital of the District of Courtelary.

Courtelary remained a rural and agricultural town until the early 20th Century.
 The farms on the valley floor produced grain for local use.
 In contrast, the surrounding mountain pastures were used by Anabaptist sharecroppers to raise dairy cattle and other livestock.
 They then produced butter and cheese which they exported.
 In 1874 the Biel-Les Convers-La Chaux-de-Fonds railroad was built through the town.
 The lower transportation costs from the railroad allowed a wood pulp factory to be built in Courtelary.
 In 1935, the Camille Bloch chocolate factory moved into the old wood pulp building.
 Other than the chocolate factory, manufacturing developed very slowly in Courtelary.
 A few precision machine and watch parts factories were built during the early 20th century, but during the 1970s these industries declined.
 In the following decades the industrial sector rebounded and in 2000 about 47% of the working population worked in industry.
Courtelary is first mentioned in 968 as Curtis Alerici in a list of the properties of Moutier-Grandval Abbey.  In 1179, Pope Alexander III elevated the Abbot to a Canon and confirmed the Abbots title to Courtelary.
In addition to Moutier-Granval Abbey, the Cathedral chapter of Saint-Imier owned properties in the village which were managed for them by the Lords of Fenis-Neuchâtel.  However, while under the control of the Lords of Fenis-Neuchâtel, the valley became a bailiwick of the Prince-Bishop of Basel.  The Prince-Bishop placed the valley under the Seigniory of Erguel.  By the late 13th century, Seigniory was controlled by the town of Biel.
Due to the rising popularity of the cult of St. Imerius, in the 10th or 11th century a small Church of St. Imerius was built in the village.  The original building was expanded in 1372, 1642 and finally in 1773.  During a restoration in 1933-36, several 11th century murals were discovered in the building.  The Courtelary parish was first mentioned in the 13th century.  In 1530, Biel began forcing the entire Erguel region to accept the Protestant Reformation.  This interference in local affairs pushed the residents of the valley to create an alliance with the town of Solothurn.  In 1604 with Solothurn's support, the appeals court moved from Biel to Courtelary which brought limited self-rule back to the valley.  Two years later the seat of the Erguel Bailiwick moved to Courtelary's New Castle (which later became the town hall).  During the Thirty Years' War, in 1639, the village was plundered and partially burned by the Duke of Saxe-Weimar's troops.
In 1726, the Prince-Bishop of Basel, Johann Konrad von Reinach-Hirzbach, attempted to modernize and consolidate his extensive land holdings.  He tried to sweep away the numerous local laws, customs and rights and replace them with a central government ruled according to the principles of enlightened absolutism.  Riots and revolts against the new government broke out almost immediately in the Erguel valley and the region remained a center of anti-government activity.  In 1733 a meeting at the Courtelary Castle exploded into a riot and the Prince-Bishop's bailiff, Benoît-Aimé Mestrezat, was forced to flee the city.  In 1792 and 1793, heavily influenced by the French Revolution, the revolutionary National Assembly of Erguel was established in Courtelary.  Revolutionaries flocked to the town and established a short-lived Republic of Erguel.  In 1797 the French invaded the lands of the Bishop of Basel and established the Canton of Courtelary with Courtelary as the capital.  The Canton was initially part of the Department of Mont-Terrible followed by the Department of Haut-Rhin.  After Napoleon's defeat, in 1815, the Erguel region became part of the Canton of Bern.  Courtelary was the capital of the District of Erguel until 1831 when it became the capital of the District of Courtelary.
Courtelary remained a rural and agricultural town until the early 20th Century.  The farms on the valley floor produced grain for local use.  In contrast, the surrounding mountain pastures were used by Anabaptist sharecroppers to raise dairy cattle and other livestock.  They then produced butter and cheese which they exported.  In 1874 the Biel-Les Convers-La Chaux-de-Fonds railroad was built through the town.  The lower transportation costs from the railroad allowed a wood pulp factory to be built in Courtelary.  In 1935, the Camille Bloch chocolate factory moved into the old wood pulp building.  Other than the chocolate factory, manufacturing developed very slowly in Courtelary.  A few precision machine and watch parts factories were built during the early 20th century, but during the 1970s these industries declined.  In the following decades the industrial sector rebounded and in 2000 about 47% of the working population worked in industry.
Courtelary