In Madame Bovary, what's a mairie?

Mairie is French for town hall or city hall.

In Madame Bovary, which is set in mid-19th century France, young (and extremely bored) Emma Bovary observes the hairdresser who lives in the same suffocating small town as her:

The hairdresser lamented his wasted calling, his hopeless future, and dreaming of some shop in a big town . . . he walked up and down all day from the mairie to the church, sombre and waiting for customers.