Thebes, known to the ancient Egyptians as Waset, was an ancient Egyptian city located along the Nile about 800 kilometers (500 mi) south of the Mediterranean. Its ruins lie within the modern Egyptian city of Luxor. Thebes was the main city of the fourth Upper Egyptian nome (Sceptre nome) and was the capital of Egypt mainly during the Middle Kingdom and the New Kingdom. It was close to Nubia and the Eastern Desert, with its valuable mineral resources and trade routes. It was a cult center and the most venerated city of ancient Egypt during its heyday.

Thebes was inhabited from around 3200 BC. It was the eponymous capital of Waset, the fourth Upper Egyptian nome. By 2160 BC, a new line of pharaohs (the Ninth and Tenth Dynasties) consolidated Lower Egypt and northern parts of Upper Egypt from their capital in Herakleopolis Magna. The rulers of the 13th Dynasty fled south to Thebes, which was restored as capital. Ahmose I founded a new age for a unified Egypt with Thebes as its capital. The city remained as capital during most of the 18th Dynasty (New Kingdom). It also became the center for a newly established professional civil service, where there was a greater demand for scribes and the literate as the royal archives began to fill with accounts and reports.

More Info: en.wikipedia.org