After the final defeat of Napoleon in 1815, the former republic of Geneva became a Swiss canton, and Savoy was returned to the Kingdom of Sardinia. The area around Gex returned to the department of Ain.