On 14 October 1806, the French defeated the Prussian army at the Battle of Jena-Auerstadt. Then French forces occupied Prussia and captured Berlin. Later they advanced towards Poland and Russia. On 7-8 February 1807, the French and Russian armies fought the Battle of Eylau. There was no clear winner. On 14 June 1807, the French defeated the Russians at the Battle of Friedland. In July 1807, France made peace with Russia, ending the war. This left Napoleon as ruler of most of western and central Europe. The exceptions were Spain, Portugal, Austria, and a few smaller states. These were able to remain independent. 