Al-Mu'tamid (r. 870–892) undertook the last known building projects in Samarra, but in the later period of his reign, he appears to have spent less time in the city. After his death, al-Mu'tadid (r. 892–902) formally returned to Baghdad, thus bringing an end to the Samarran interlude. Al-Muktafi (r. 902–908) at one point considered moving back to Samarra and encamped in the Jawsaq palace, but was eventually dissuaded after his advisers informed him of the high costs of the plan.