Panevėžys was first mentioned in a document, that was written in 1503, September 7th. In the document, the Grand Duke of Lithuania and the King of Poland gifted some land to a parson from Ramygala. In exchange for the land, the parson had to build a church in the land to fight paganism. A small wooden church was built here