The Battle of Trafalgar, during which Admiral Nelson lost his life, established Britain's naval supremacy for the rest of the Napoleonic era, and even for the rest of the 19th century. Napoleon, however, still seemed unbeatable on land. His control of Europe was rapidly growing, and if he was not stopped soon, control of the resources of all of Europe would eventually allow him to build a Navy large enough to beat the more skillful British at sea.
Alexander I was an interesting historical character. While Britain remained Napoleon's archenemy, we could well consider Alexander as Napoleon's "foil". Like Napoleon, Alexander controlled a vast territory, and was one of the most powerful forces in Europe. Alexander also considered himself an "enlightened despot". Although a czar in the Russian tradition, he had been educated by a very liberal Swiss tutor, and had a very progressive, modern outlook. He wanted to rationalize and modernize the Russian state, and he surrounded himself with educated advisors for that purpose. He saw himself as Napoleon's rival in Europe, and he was fairly original as monarchs go, advocating an idea of "collective security" for all of Europe, by which all of the powers would work together to make sure no one nation grew too powerful, so it could dominate all the other nations. Thus, he wanted the other nation to ally against whoever was most powerful, at this time France. But his opposition to France was not only based on rational calculations of "collective security", for Alexander was genuinely jealous of Napoleon's power and influence. Furthermore, his anti- Napoleonic stand was sweetened by a British offer to pay Alexander 1.25 million pounds for every 100,000 soldiers he raised to oppose Napoleon. Finally, Alexander wanted what Russian rulers always want: Poland. Poland would serve as a "buffer" between Russia and invasion from Western Europe, and it would allow the czar to extend his influence westward, into central Europe, and thereby gaining power in European affairs.
Why did Alexander ever agree to ally with Napoleon in the Treaty of Tilsit? Napoleon, always crafty, managed to appeal to Alexander's ego. He said that he and Alexander were alike, and that while Napoleon's destiny was an empire in Europe, Alexander would be the emperor of the East, ruling Turkey, India, and the like. Together, said Napoleon, nothing could stop them. Napoleon also claimed that Alexander's problems were caused by the "real enemy", Britain. Given his dire straits, Alexander allowed himself to believe Napoleon and signed the treaty.