The Palatinate War of Succession took place during 1736-42.
In 1735, Ludwig XVIII, last Wittelsbach duke of the Rhine Palatinate, died without heir. It wasn't completely clear whether France or Bavaria should get it. New emperor Heinrich IX of Brandenburg let the French unmisunderstandably know that he wouldn't tolerate them taking it. As a result, the war broke out.
Although the German and Swedish-Dutch armies couldn't defeat the French armies, when Spain and Britain threatened France, peace was made. The Palatinate went neither to France nor Bavaria, but to a grandnephew of the Bourbon king of Hungary. In case he and his brother should die without heir, the Palatinate would fall back to Bavaria - which eventually happened.