Székesfehérvár is a city in central Hungary, the administrative center of Fejér county. It lies on the southern bank of the River Danube, about 100 kilometers (62 mi) west of Budapest. Székesfehérvár is the seventh largest city in Hungary. The city has a rich history, dating back to the 9th century. The city played an important role in the history of Hungary and was the capital of the country for more than 700 years. The city was first mentioned in historical documents in 896. Székesfehérvár reached the peak of its importance in the 14th century, when it became the capital of the country. The city was the home of the royal court and the center of Hungarian politics.