The fortress of Porkhov is believed to have been founded in 1239 by Alexander Nevsky. The timber fortress was sacked by Algirdas (Olgierd) in 1356 and fell in flames in 1387. The Novgorod Republic immediately rebuilt its fortifications in limestone downstream. In 1428, Grand Duke of LithuaniaVytautas destroyed the western wall by artillery fire and entered Porkhov. Two years later, the Novgorodians augmented the fortress and rebuilt its walls. After the fall of Novgorod to the Muscovites in 1478, the fortress lost its military importance.