In 1403, Uri began to acquire its transmontane bailiwicks, with the help of Obwalden taking the Leventina valley from the duke of Milan. The conflict between the Swiss Confederacy and the Duchy of Milan for territories now forming canton of Ticino continued throughout the 15th century. The conflict was decided in 1500, when the Confederates captured Bellinzona, heavily fortifying it against future conquests. The Confederates also acquired Lugano in 1512, but the period of territorial expansion came to its end in 1515 with the Confederate defeat at Marignano.