Why did Abbasid rulers bring Imam Hassan al-ˈAskarī (the eleventh Imam of Shia) with his father, Imam Hādī to Samarra to live within a military zone to be under a strict control?

Why did Abbasid rulers bring Imam Hassan al-ˈAskarī (the eleventh Imam of Shia) with his father, Imam Hādī to Samarra to live within a military zone to be under a strict control?

Abbasid rulers heard through some authentic narrators from the Prophet to have said something about the birth of a boy that was contrary to what Abbasid wished to do in their government. They heard that the Prophet said several times:

  1. I will have twelve successors;
  2. They are all my descendants and are from the Quraysh tribe;
  3. My first successor is Ali bin Abī Ṭālib and the last one of them is al-Mahdi;
  4. The twelfth successor of mine is the son of Imam Hassan al-ˈAskarī whose name is the same as mine. (The real name of Imam al-Mahdi is Muhammad and al-Mahdi is his cognomen.);
  5. My twelfth successor is the ninth generation of Imam Hussain whose another name (or cognomen) is al-Mahdi;
  6. When al-Mahdi will be born, he will, later on, put an end to the oppressive rulers and to their governments, will establish a global government, will implement justice and monotheism in the world, and will uproot the base of tyranny and unfairness.

They were sure that Imam Mahdi was not yet born so, in the year of 232 A. H., al-Mutawakkil (Abbasid caliph) who was fully aware of what was supposed to take place, brought the tenth Imam and his son to Samarra with the intention to kill the eleventh Imam who was fully young and was about to get married, to block the passage of the birth of the twelfth Imam.
http://Mahdism.net