Ueda is a city located in Nagano Prefecture, Japan. Ueda is located in former Shinano Province and during the Nara period was the provincial capital. The ruins of the Shinano Kokubunji are also to be found within Ueda. However, the provincial capital was shifted to Matsumoto during the early Heian period. During the Sengoku period, the area was the centre of the powerful Sanada clan.