Karl (or Carl) Philipp Josef, Prince von Wrede (ˈvʁeːdə; 29 April 1767 - 12 December 1838) was a Bavarian field marshal. He was an ally of Napoleonic France until he negotiated the Treaty of Ried with Austria in 1813. Thereafter Bavaria joined the coalition. Von Wrede was born at Heidelberg, the youngest of three children of Ferdinand Josef Wrede (1722–1793), created in 1791 1st Baron von Wrede, and wife, married on 21 March 1746, Anna Katharina Jünger (1729–1804), by whom he had two more children: Baroness Luise von Wrede (23 September 1748 - 9 February 1794), married to Philipp, Baron von Horn (died 1834); and Baron Georg von Wrede (8 December 1765 - 3 April 1843), married on 17 January 1808 to Julie Zarka de Lukafalva (1781 - Osen, 1 August 1847), by whom he had issue. He was educated for the career of a civil official under the Electorate of the Palatinate government, but on the outbreak of the campaign of 1799 he raised a volunteer corps in the Palatinate and was made its colonel. This corps excited the mirth of the well-drilled Austrians with whom it served, but its colonel soon brought it into a good condition, and it distinguished itself during Kray's retreat on Ulm. At the Battle of Hohenlinden Wrede commanded one of the Palatinate infantry brigades with credit, and after the peace of Lunéville he was made lieutenant-general in the Bavarian Army, which was entering upon a period of reforms. Wrede soon made himself very popular, and distinguished himself in opposing the Austrian invasions of 1805. Wrede was engaged in the campaign against Prussia, winning especial distinction in the Battle of Pułtusk. But the attitude of the French towards the Bavarian troops, and accusations of looting against himself, aroused the general's fiery temper, and both in 1807 and in 1809 outward harmony was only maintained by the tact of Maximilian, the king of Bavaria. In the War of the Fifth Coalition, he led the 2nd Bavarian Division in the VII Corps. He played an important part in the Battle of Abensberg on 20 April 1809.