The silhouette of the Riga Castle on the right bank of the Daugava is a characteristic feature of the Riga skyline, which for centuries has been witness to the power or weakness of the rulers.
Year 1515 is the accepted date for the construction of the Riga Castle: it is this year that concludes the inscriptions under the stone figures of the Madonna and the Master of the Livonian Order Wolter von Plettenberg (1494–1535) above the Castle gate; this same year is also mentioned in written documents about the construction costs. The oldest graphic representations of the completed Castle in views of Riga appear in the years 1589, 1603, and 1612. On the picture of 1612, printed at Nickolaus Mollin's printing house in Riga, the Castle is represented in great detail, complete with an annex on the north side, fortifications, and the gate tower.
To comply with the provisions of the capitulation treaty after the defeat in the battle near Bukulti in 1491 and to recognise the rule of the Master of the Livonian Order and Archbishop of Riga, citizens of Riga had to build a castle in place of the former residence of the Master of the Livonian Order, which they had torn down earlier. During the Livonian War (1558–1583), it was in the Castle of Riga that the self-liquidation act of the Livonian Order was signed in 1561. Even though Riga was included in the Polish–Lithuanian State only in 1581, the Castle became the residence of its local potentates.
During the Polish–Swedish War (1600–1629), the battle with uneven success was fought also over Riga, with the Castle lasting even a couple of weeks longer than the city. The residence of the Governor of Livland and later Governor-General was supplemented with the bulwarks of Horn and Tot and, at the end of the 17th century, the fortifications of the Castle were modernised. During the Great Northern War (1700–1721), capitulation provisions were signed in the Castle in 1710 after a lengthy siege, and in the church of the Castle the knights and clergy swore allegiance to Field-Marshal Boris Sheremetyev.
The Governors-General of Riga and later Livland resided in the Castle. The most important reconstruction work at the Castle took place at the time of Count Georg Braun (1762–1792), Marquis Philip Paulucci (1812–1829), Baron Carl Magnus von der Pahlen (1830–1845), Prince Alexander Suvorov-Rimniksky (1848–1861), and Prince Piotr Bagration (1870–1876). The outer appearance of the medieval building changed, with the number of usable space increasing and residential quarters gradually being filled with various state institutions.
During World War I, the residents of the Castle changed several times, and only after the armistice of Strazdumuiža (3 July 1919) the Latvian flag began to be flown from the tower of the Castle. The Prime Minister and the State Chancellery moved into the Castle, but in 1922 it became the residence of the President of Latvia.
During the occupation period, the dankness of the walls and other inconveniences made the soviet administration look for other solutions, and some of the Castle space was turned over to the pioneer organisation, whereas the rest of it housed several museums.
The towers of the Riga Castle are also important as the location where the red-white-red flag was raised during the period of regaining independence. If the flag of the President is flown, it means that the President is in the Castle, for, in the summer of 1995, it once again became the residence of the President. An important symbol of Latvia, the Riga Castle is marking its 500th anniversary with a fresh coat of paint and a silver collector coin dedicated to it by Latvijas Banka.