Baghdad is the capital of Iraq . The population of Baghdad , as of 2016, is approximately 8,765,000 , making it the largest city in Iraq , the 2 nd largest city in the Arab world (after Cairo, Egypt), and the 2 nd largest city in Western Asia (after Tehran, Iran). Located along the Tigris River , the city was founded in the 8th century and became the capital of the Abbasid Caliphate