Maišiagala, first mentioned in 1254, is one of the earliest Lithuanian settlements. It had a large defensive castle, which was part of the defensive network around Vilnius against the Teutonic Knights. The wooden castle was destroyed in 1365, but was rebuilt. According to Jan Długosz, Grand Duke of Lithuania Algirdas died in this castle in 1377. After the Christianization of Lithuania in 1387, Maišiagala was one of the seven towns in Lithuania where a Catholic church was built. In 1390, during the Lithuanian Civil War of 1389–1392, the castle was burned down and was not rebuilt.