In 1813, the Swiss traveller and orientalist Johann Ludwig Burckhardt visited Ta'if. He has left an eyewitness account on the city just after it was taken back by the Muhammad Ali, with whom he obtained several interviews while he was there. According to Burckhardt, the wall and ditch around the city had been built by Othman el Medhayfe. There were three gates and several towers on the city walls, which, however, were weak, being in some places only thick. The castle had been built by Sharif Ghalib. He also noted the destruction of the city caused by the conquest of 1802. Most of the buildings were still in ruin while he was there and the tomb of Abdullah ibn Abbas – cousin of Muhammad and ancestor of the Abbasid Caliphate – had been severely damaged. He also recorded that the population of the city was still mostly Thaqīf. In terms of trade, the city was an trading post for coffee.