The building was constructed in the mid-16th century by order of King Stefan Batory, initially serving as the war veteran's hostel. During the reign of King Władysław IV of Poland, between 1638 and 1643 the building was thoroughly reconstructed by General of Engineers Paweł Grodzicki to suit the needs of a city arsenal. It received a classicist finish and its walls were thickened in order to allow for its defense against direct attacks. Since then the building served as the main armory of the Warsaw's garrison. In the 18th century it was twice rebuilt, the first time between 1752 and 1754 and then between 1779 and 1782. The latter modernization of the arsenal was carried over by Szymon Zug and Stanisław Zawadzki, both being among the most renowned Polish architects at the time. During the Warsaw Insurrection of 1794, the building was a scene of heavy fighting between the Polish Army and civilians, and the Russian units occupying Warsaw. Damaged during the fights, in 1817 it was rebuilt under the leadership of Wilhelm Minter. Following the November Uprising, until 1835 the building was being rebuilt to become a large tsarist prison. However, eventually the Russian authorities decided to build the huge Warsaw Citadel instead and the arsenal was then converted to a place of temporary detention of common criminals, rather than the political prisoners held in the citadel. After Poland regained her independence, the building continued to serve as a police precinct but was in dire need of renovation. Between 1935 and 1938, during the presidency of Stefan Starzyński, the arsenal was once again converted to another purpose, this time to house the city archive. The main architects, Bruno Zborowski and Andrzej Węgrzecki, decided to restore much of the external design of the courtyard to its original, 17th-century outlook. The building survived the Polish Defensive War of 1939 and continued to serve its pre-war role during the German occupation of Poland. In the spring of 1943, in front of it, the Szare Szeregiresistance organization conducted one of its most spectacular actions by liberating a number of political prisoners being transferred by the Gestapo from one prison to another. The operation is hence called Operation Arsenal. The building then saw heavy fighting during the ill-fated Warsaw Uprising of 1944 and was one of the Polish redoubts in the area, defending the area of Warsaw's Old Town from the west. Following the capitulation of the uprising, the arsenal was completely destroyed by the Germans, together with the surrounding buildings and Simmons' passage, one of the most luxurious shopping malls in the inter-war city. In 1948 it was decided that the arsenal be rebuilt in its original form. Finishing their work in 1950, the workers replicated the building to resemble how it looked like in the 17th century, under the supervision of Bruno Zborowski. Since 1959 it has housed the Archaeological Museum of Warsaw.