The borders between the three countries got the shape they have had since in the middle of the seventeenth century: In the 1645 Treaty of Brömsebro, Denmark–Norway ceded the Norwegian provinces of Jämtland, Härjedalen and Idre and Särna, as well as the Baltic Sea islands of Gotland and Ösel (in Estonia) to Sweden. The Treaty of Roskilde, signed in 1658, forced Denmark–Norway to cede the Danish provinces Scania, Blekinge, Halland, Bornholm and the Norwegian provinces of Båhuslen and Trøndelag to Sweden. The 1660 Treaty of Copenhagen forced Sweden to return Bornholm and Trøndelag to Denmark–Norway, and to give up its recent claims to the island Funen.