Mainz was at the center of many battles in the aftermath of the French Revolution: attacked by the French in 1792 and by the Prussians and Austrians in 1793. It was ceded to France by two treaties in 1797 and 1801, but then ceded to Germany in 1816 after the fall of Napoleon. In that year the university, founded in 1477, was closed.
Mary Shelley describes Mainz in The History of a Six Weeks' Tour, under "Germany":
Mayence is one of the best fortified towns in Germany. The river, which is broad and rapid, guards it to the east, and the hills for three leagues around exhibit signs of fortifications. The town itself is old, the streets narrow, and the houses high: the cathedral and towers of the town still bear marks of the bombardment which took place in the revolutionary war.