Tata (; ) is a town in Komárom-Esztergom County, northwestern Hungary, northwest of the county town Tatabánya. Location Tata is located in the valley between the Gerecse Mountains and Vértes Mountains, some from Budapest, the Hungarian capital city. By virtue of its location, it is a railway and road junction. Motorway M1 (E60, E75) from Vienna to Budapest passes through the outer city limits, and the railway line Budapest–Vienna goes through the city. Demographics According to the 2001 census, the town has 23,937 inhabitants: 93.3% Hungarians, 1.6% Germans, 0.6% Roma, 0.2% Slovaks and 6.5% other. History The area has been inhabited since prehistoric times; archaeological findings date back to 50,000 BCE. Later it was a Roman settlement. The first known mention of Tata is from 1221. Its name may come from the name of Lombard king Tato. Its castle was built by the Lackfi family and had its prime under Matthias Corvinus, who had it rebuilt in a Renaissance style. In 1526 when the disastrous battle with the Turks happened and Louis II died in the battlefield, Count György Cseszneky was the castellan of the Castle Tata. The plundering Ottoman army ransacked the area, but Cseszneky successfully defended the castle. During the Ottoman occupation, the castle of Tata was an important fortress. It was captured in 1543 by the Turks. During this period the castle had many different owners until it was burned down by the Habsburgs in retaliation for the Rákóczi's War of Independence. In 1727, Count József Esterházy bought Tata and the surrounding villages. The town prospered, in 1765 it already had a secondary school. According to the article in the Pallas Lexicon about Tata in 1851, the town was a "pretty and developing village in the Tata district of Komárom comitatus; 895 buildings, 6925 mostly Hungarian residents (3633 Roman Catholics, 2518 Lutherans and 673 Israelites), centre of the district, with secondary school, railway station, post office. Tata and the adjoining village Tóváros (4257 residents) are built around a large lake, Tata on the hillside, and Tóváros on the plain. Between them, there are the Esterházy mansion and an old castle with an archive and a gallery which included a painting of Leonardo da Vinci. The theatre was built in 1889. The mansion is surrounded by the beautiful English garden (140 hectares)." In 1938, the village of Tóváros was annexed to Tata. So thus, the city was renamed