To the northwest, Russia engaged in a century long struggle against Sweden for control of the Baltic Sea. The Empire succeeded by the 1720s, obtaining not just access to the sea but ownership of Finland and the Baltic states of Latvia, Lithuania and Estonia. To the west, there were a series of wars with Poland and Lithuania, followed by negotiated settlements with Prussia and Austria that gave Russia control of most of Ukraine, and a large slice of Poland. Napoleon unsuccessfully challenged the Russians directly with his 1812 invasion of Russia. Russia seized more territory and became a great power, with a strong voice in the affairs of Europe from 1814 to the 1840s.