War of the Pyrenees
For much of the 18th century, Spain and France were allies but after the execution of Louis XVI in 1793, it joined the War of the First Coalition against the French First Republic. After being defeated in the War of the Pyrenees, Spain left the Coalition and made peace with France by the 1795 Peace of Basel.