While there was a royal palace in Locarno in 866 and a noble family with a castle in the 10th century, the oldest remaining parts of the Castello (part of the ring wall and residential tract and foundation of a tower) date to the late 12th or 13th century.
In 1164 Emperor Frederick Barbarossa granted Locarno the right to hold a market and for the first time mentioned the Capitanei di Locarno or noble families that administered the town and the Pieve or local church. While the Capitanei enjoyed the right of imperial immediacy, they did not always support the emperor. By around 1240 Locarno had become a stronghold of the Guelph faction which supported the pope against the emperor, possibly leading to the construction or expansion of the castle. In 1260 the Castello was attacked and destroyed by the pro-emperor Ghilbellines, leading Simon di Orelli, the most powerful member of the Capitanei to join the Ghilbellines and bring the town to the emperor's side until his death in 1290. The castle was rebuilt following the destruction of 1260.
During the 14th century Milan under the Visconti aggressively expanded into the valleys at the foot of the Alps. In 1342 Lucchino and Giovanni Visconti besieged and captured the castle from both the landward and lake sides. Many members of the Capitanei were captured. After accepting the Visconti as their new overlords, they were quickly released from captivity and restored to their former positions under a podestà appointed by Milan. The podestà became the only resident of the castle and some of the buildings were allowed to fall into ruin. However, under the Visconti the fortifications were strengthened and new defensive walls were built.
In 1439 the Visconti appointed Franchino Rusca as podestà in Locarno. Under the Rusca family, the castle was renovated, repaired and expanded. It was transformed into an ornate late medieval administrative castle. A little south of the old main tower, a palazzo was built with ornate halls, large chimneys, and an arcade leading to the courtyard. It was surrounded by a ring wall with machicolations and half-round towers which were topped with swallow-tail merlons. Today, part of the Rusca castle wall still remains on the south-west side of the castle compound. By the mid to late 15th century the Duke of Milan became concerned that the Rusca family might support the Old Swiss Confederacy against Milan. He appointed a castellan to manage the castle for him. The Rusca family remained at the castle in the palazzo, while the castellan lived in the old main tower, known as the Rocca. The various castellans often wrote letters to Milan asking for money to repair the old, uncomfortable tower and more soldiers to garrison it.
In 1495 Louis XII of France offered Locarno to the Swiss Confederacy in exchange for military help against Milan. Four years later he invaded Lombardy and quickly captured the castle and town of Locarno. However, he continually delayed and avoided handing the town over to the Swiss. In 1503, the Confederation invaded and conquered the Leventina valley and captured Locarno. However, the Treaty of Arona, in the same year, gave the fortifications at Bellinzona to the Confederation but returned the town to France. In 1507 the castle complex was expanded, for the last time, when the Rivellino, a triangular bastion, was added to the north side of the complex. In 2006 the historian Marino Viganò presented evidence that the Rivellino was designed, planned and constructed by Leonardo da Vinci, though no surviving documents prove this.
In 1512, during the War of the League of Cambrai, the Confederation again invaded the Alpine foothills including Locarno. They besieged the castle, but did not have the artillery needed to capture it. In 1513, negotiations after the decisive Swiss victory at the Battle of Novara gave temporary control over the castle to the Swiss. The 1516 peace treaty which ended the War of the League of Cambrai gave them permanent control over much of Ticino including Locarno.
The Swiss appointed a landvogt to administer Locarno for the Confederation from the castle. The expense of maintaining the large complex soon proved to be too much and in 1531 they decided to demolish much of the complex. By 1532, most of the walls were demolished, leaving only the palazzo. Three years later the fortifications at the harbor near the castle were also removed. Maintaining just the palazzo remained expensive and by 1762 the Landvogt Anton Schuhmacher reported that the roof was in such poor condition that it rained in every room. The castle remained the seat of the Swiss vogt until the 1798 French invasion of Switzerland and the creation of the Helvetic Republic. After the collapse of the Republic, the 1803 Act of Mediation created the new Canton of Ticino and transferred the castle to the new Canton. It was used as a cantonal administration building until 1921 when it transferred to the town of Locarno. Locarno repaired the castle and transformed it into a museum, the Museo civico e archeologico.References:
German crusaders known as the Livonian Brothers of the Sword began construction of the Cēsis castle (Wenden) near the hill fort in 1209. When the castle was enlarged and fortified, it served as the residence for the Order's Master from 1237 till 1561, with periodic interruptions. Its ruins are some of the most majestic castle ruins in the Baltic states. Once the most important castle of the Livonian Order, it was the official residence for the masters of the order.
In 1577, during the Livonian War, the garrison destroyed the castle to prevent it from falling into the control of Ivan the Terrible, who was decisively defeated in the Battle of Wenden (1578).
In 1598 it was incorporated into the Polish-Lithuanian Commonwealth and Wenden Voivodship was created here. In 1620 Wenden was conquered by Sweden. It was rebuilt afterwards, but was destroyed again in 1703 during the Great Northern War by the Russian army and left in a ruined state. Already from the end of the 16th century, the premises of the Order's castle were adjusted to the requirements of the Cēsis Castle estate. When in 1777 the Cēsis Castle estate was obtained by Count Carl Sievers, he had his new residence house built on the site of the eastern block of the castle, joining its end wall with the fortification tower.
Since 1949, the Cēsis History Museum has been located in this New Castle of the Cēsis Castle estate. The front yard of the New Castle is enclosed by a granary and a stable-coach house, which now houses the Exhibition Hall of the Museum. Beside the granary there is the oldest brewery in Latvia, Cēsu alus darītava, which was built in 1878 during the later Count Sievers' time, but its origins date back to the period of the Livonian Order. Further on, the Cēsis Castle park is situated, which was laid out in 1812. The park has the romantic characteristic of that time, with its winding footpaths, exotic plants, and the waters of the pond reflecting the castle's ruins. Nowadays also one of the towers is open for tourists.