Gex, Ain

Gex (Gèx; Gesio) is a commune in the Ain department in eastern France and a subprefecture of the department.

It lies 5 km from the Swiss border and 16 km from Geneva. It is a subprefecture of Ain.

History
The town gave its name to the Pays de Gex, at various times under the jurisdiction of France, Switzerland and the Duchy of Savoy.

The future site of Gex was inhabited around 1800 BC. Around 220 BC, a group of Gallic warriors known as the Gaesatae resided in the area around Gex. Afterwards, the town was part of Roman Gaul.

In 1252, Léonette of Geneva, Lady of Gex, descendant of the count of Geneva, Amadeus I, married Simon of Joinville, son of Simon of Joinville and Beatrix of Auxonne, Lady of Marnay. The city of Gex was included in her dowry. Later that century, the Joinvilles set up a castellan and a judge in the town.

On November 13, 1353, the town of Gex as well as its castle were captured by Savoy, and the pays de Gex was incorporated into the Savoyard state for nearly two centuries. The pays de Gex was invaded in 1536 by the Canton of Bern. The Bernese established a bailiwick at Gex, managed by a bailiff. Walls were built in 1550.

The pays de Gex was returned to the Duchy of Savoy by the treaties of Nyon in 1563 and Lausanne in 1564. The Genevans seized it in 1589. Savoy, with the assistance of Spain, tried several times to take back the pays de Gex, but they were unsuccessful. During these attacks, the town of Gex was burned in 1590 on July 23 and again on July 30; few of the houses withstood the fires.

In 1601, during the reign of Henry IV, control of the pays de Gex passed to France as part of the Treaty of Lyon.

With the 1815 Protocol of the Conference of Paris, (signed on 20 November) and the Treaty of Paris of the same date, Gex was placed in the Customs region of Switzerland and neutralised. The resolutions regarding the Pays de Gex were annulled by Art 435 of the Treaty of Versailles. In November 1923 France moved its customs office to Gex, and the matter was brought before the Permanent Court of International Justice (predecessor of the International Court of Justice), which decided in favour of Switzerland; this case is also notable for being an early example of the doctrine of fundamentally changed circumstances being invoked before an international court. A compromise was reached in 1932.

Historically, citizens spoke a dialect of the Franco-Provençal language but this dialect is not in use anymore. In 1910 the commune of Mijoux was created from part of the commune of Gex.

Population
Population data for 1906 and earlier include the commune of Mijoux.

Economy
Its principal market for exports is Geneva. A weekly market takes place in the town on Saturdays.