In 1710, the cities of Peterhof and Oranienbaum were founded on the southern shore of the Gulf of Finland. On 27 July 1714, near the Hanko Peninsula, the Russian Navy won the Battle of Gangut – a decisive victory over the Imperial Swedish Navy. The Russo-Swedish war ended in 1721 by the Treaty of Nystad, by which Russia received all the lands along the Neva and the Gulf of Finland, as well as Estland, Swedish Livonia and western part of the Karelian Isthmus, including Vyborg. However, Finland was returned to Sweden. The war resumed in (1788–1790), and the Battle of Hogland occurred on 6 July 1788 near the island Gogland. Both the battle and the war were relatively minor and indecisive, with the outcome of Russia retaining its territories.