unwanted pregnancy

The majority and dominant Islamic opinion is what XXX posted but there are mixed views and some scholars do believe it is allowed (with conditions) to abhort within a certain timeframe. Another surprising minority view I wasn’t aware of:

Some Muslim scholars also argue in favor of abortion in early pregnancy if the newborn might be sick in some way that would make its care exceptionally difficult for the parents (eg. deformities, mental retardation, etc). Some scholars argue that abortion is allowed for important reasons in the first 40 days. Sheikh Nasr Farid Wasil extends this period to 120 days.

More info on the differing opinions: When it is permitted to have an abortion

Very controversial subject..