By Mamoon's time medical schools were extremely active in Baghdad. The first free public hospital was opened in Baghdad during the Caliphate of Haroon-ar-Rashid. As the system developed, physicians and surgeons were appointed who gave lectures to medical students and issued diplomas to those who were considered qualified to practise. The first hospital in Egypt was opened in 872 AD and thereafter public hospitals sprang up all over the empire from Spain and the Maghrib to Persia. (Glubb)
All this sophisticated knowledge and science could not be pursued without the active interest of the Khalifs. Why ere the Khalifs so intensely interested in the pursuit of knowledge? They were so because they knew that without knowledge they would not able to fulfill their mission on this earth. They knew that knowledge was power; they also knew that public service was service of Islam; they also knew that without people's welfare their rule and mission would be a failure; they knew that they were carrying out the torch of light to all humanity. This was at a time when most of humanity was living in very primitive conditions in most European countries, including England and France.
Knowledge in Islam is so important that the Prophet of Islam asserted that to seek knowledge was holier than fighting on the battlefield in the way of Allah and commanding people to seek knowledge even unto Chine and saying that the pursuit of knowledge was an obligation for every Muslim, man and woman. But the question arises of which knowledge should be acquired. There are millions of knowledgeable people throughout the world, but they are unable to recognize their Lord. They have only recognized the ‘glitter' of this world. To them life means the fulfillment of their carnal desires. Anything beyond carnal desires, beyond matter, is not understandable to them. They see nothing but matter and thus they are materialists.
Without true knowledge a man remains no better than an animal. True knowledge comes from Allah. And that is why the Prophet said, the best of you is the one who has learnt the Qur'an and then taught it. The best of men is he who has been gifted with true knowledge of the Qur'an and the Sunna. It is for this reason that the Prophet said, the knowledgeable persons (of Qur'an and Sunna ) are the heirs of the Prophets. When the early Muslims went on conquering country after country, they conquered the spirits of people and not the lands. What they wanted was to spread the Message, the Truth, and never out of vengeance or for the wealth of this world. They wanted to establish the rule of Allah on this earth, not man-made rule. Muhammad ibn Qasim's invasion of India originated from just such a spirit and aspiration to established justice on this earth.
When a country is populated by unbelievers it can remain as it is, but when it is populated by unjust people it cannot be permitted to remain as it is. Ali ibn Abi Talib. The idea of the equality and brotherhood of all Muslims comes from true knowledge. When a man knows that the pride and arrogance of men of this world are nothing but the cause of ruination, he will surrender to his Lord. And the moment he surrenders he is a Muslim. And all great Muslims of this world have merely contributed to the central fact of knowledge that Allah is the Source of all knowledge and that if he wants to succeed in this world man has to drink deep from this source.