Abortion: In medicine, an abortion is the premature exit of the products of conception (the fetus, fetal membranes, and placenta) from the uterus. It is the loss of a pregnancy and does not refer to why that pregnancy was lost. (http://www.medterms.com/script/main/art.asp?articlekey=2091)
Is abortion allowed by Islam? This depend on whether abortion can be equated to murder. No doubt that murder is definitely prohibited by Islam as stated by Quran and Hadits. Consider this:
And do not kill anyone which Allah has forbidden,except for a just cause. And whoever is killed (intentionally with hostility and oppression and not by mistake), We (Allah) have given his heir the authority (to demand Qisash- law of equality in punishment- or to forgive, or to take Diya – blood money – ). (al-Israa’ 17:33)
What is murder then? Murder is defined by: “It refers to the killing or death of a person by another sane person unlawfully and proved to be under no authority to kill or with the intent of killing the other because of malice or revenge” (http://www.legalexplanations.com/definitions/murder.htm )
Is this definition confirm to what Islam meant by murder? In arabic term, murder by intention is said by “qatlu al-‘amd”. Ethimologically it is composed by two words: al-qatlu and al-amd. Qatlu means any actions that lead to the removal of life  whereas the word al-amd means intentionally . Thus what is meant with murder by intention is someone that legally have been grownup (mukallaf) intentionally and by plann act to remove others’ life that his life is protected by sharia, with any means that normally could be used to kill 
 Al-Mausu’ah al-Fiqhiyah: 32/321.  Ibid: 30/307.  see: Tuhfat al-Labib fi Syarhi at-Taqrib hlm. 374, and al-Mulakhash al-Fiqh: 2/465.
By understanding the definition of murder that is prohibited by Islam, one can see whether abortion contain things that are mentioned in the definition which are:
- Living removal
- With intention
The condition of “with intention” is fulfilled in an abortion act. But the condition of “Living removal” is highly conditioned by the state of the fetus. The fetus according to science can be detected to move about week 21 (http://en.wikipedia.org/wiki/Fetus#cite_noteJAMA-11) indicating it already having life. But according to hadith, a fetus is already given life by Allah at the week 17:
Narrated by Abdullah that the prophet said: indeed the human being is beginning to be created in mother’s whomb for forty days (when it fertilized), then within another forty days it become ‘alaqah (zygote), and within another forty days it become mudhghah (leech like things), and within another forty days Allah send an angel that is orderred to write four things, its destiny, its sustenance, its death, and its life then He give it life by breathing his soul onto it (Muslim 4781).
Thus abortion after the day of 120 after fertilization can be considerred as murder, and not when it doing before. From this point of view, the abortion, when there are medical needs, is allowed before the day of 120 after conception.
The Hanafian school permitted abortion when the age of the fetus is before 120 days. The great Hanafi Faqeeh Ibn Abidin States in his Radd al-Muhtar: “The soul enters the foutus at one hundred & twenty days (4 months), as established by the Hadith” (Radd al-Muhtar, 1/202)
The Maliki view abortion is not allowed after the implantation has taken place. Most of the Maliki jurists (legal scholars) described abortion as completely forbidden. In their view, when the semen settles in the womb, it is expected to develop into a living baby and it should not be disturbed by anyone. According to Ibn Jawziyyah, when the womb has retained the semen, it is not permitted for the husband and wife, or one of them or the master of the slave-wife, to induce an abortion. After ensoulment, however, abortion is prohibited absolutely and is akin to murder.
The Syafi’i scholar (dominant in Southeast Asia, southern Arabia, parts of East Africa) allows abortions to be performed up to day 120. While the Hanbali school (predominant in Saudi Arabia and United Arabic Emirates) abortions are principally prohibited from day 40 onward.