Praise be to Allah.
A mortgage is a haraam riba-based transaction that is based on a loan with interest in which the owner of the money takes as collateral the property for the purchase of which the borrower is taking out the loan, until the debt has been paid off along with the interest (riba). If the debtor is late in making payments, then the owner of the money is entitled to sell the property and take back his money.
This transaction is offered by riba-based banks or real estate mortgage companies, and this transaction is done when the one who wants to buy a house chooses a house, then he goes to the mortgage company – or to the riba-based bank – to ask them to buy that house and he agrees to pay the money in instalments, plus the interest that has been agreed upon. A representative of the company or bank meets with the owner of the house and the third party, namely the borrower, and the price of the house is paid in full to the owner. In some cases the borrower pays part of the price (down payment). And the contract is signed with the borrower for the money paid to the owner of the house plus the interest. The house is mortgaged to the mortgage company or bank that pays the money to the owner of the house. If the borrower fails to pay any instalment on his loan, the mortgage company has the right to sell the house in order to get back the rest of the money that it is owed by the borrower.
This transaction clearly comes under the heading of blatant riba. Allah, may He be exalted, has forbidden riba and has issued a warning to those who consume it of a severe punishment as He, may He be exalted, says (interpretation of the meaning):
“Those who eat Riba (usury) will not stand (on the Day of Resurrection) except like the standing of a person beaten by Shaytaan (Satan) leading him to insanity. That is because they say: "Trading is only like Riba (usury)," whereas Allah has permitted trading and forbidden Riba (usury). So whosoever receives an admonition from his Lord and stops eating Riba (usury) shall not be punished for the past; his case is for Allah (to judge); but whoever returns (to Riba (usury)), such are the dwellers of the Fire - they will abide therein”
This riba-based transaction is not permissible either in Muslim countries or non-Muslim countries; it is not permissible in order to acquire houses or stores.
Some contemporary scholars have permitted this riba-based transaction if it is in a non-Muslim country and it is done in order to acquire a house in which to live. This permission is attributed to the Hanafi madhhab, and some evidence is quoted for it. But many scholars have challenged this fatwa, including Shaykh Salaah as-Saawi (may Allah preserve him) in his book Waqafaat Haadi’ah ma‘a Fatwa Ibaahat al-Qurood al-Ribawiyyah li Tamweel Shira’ al-Masaakin fi’l-Mujtama‘aat al-Gharbiyyah.
See also the answer to question no. 126056
And Allah knows best.