Avicenna was born near Bukhara, which at the time was ruled by Samanid dynasty. His father was a government official and his home served as a meeting place for men of learning. Avicenna had educated teachers while growing up. By age 14 he had mastered many subjects and had already memorized the Quran. From the age of 14 to 18 he taught himself because he could not find a tutor to provide more information than he already knew. He began to practice and learn about medicine at 16. He also learned about law and natural sciences. He was good at all subjects but decided medicine was easier for him than mathematics or metaphysics. Sometime before he turned 18 years old, he cured a Samanid emir. Because of his he was allowed into the royal libraries of the Samanid dynasty. By the age of 18 he had become a master of the most important works of science in his time. Also, his reputation as a doctor had grown. At 20 he was regarded as one of the wisest people of his time.