In 1919 Mažeikiai became the county centre and received the rights of self-government. During the first years of independence, Mažeikiai was subject to a territorial dispute between Lithuania and Latvia because of its importance as a railway hub between the Latvian cities of Riga, Jelgava and Liepaja. In 1921 Latvian claims for the town were rejected by an international commission.