Wa `alaykum As-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear brother in Islam, we commend your pursuit of knowledge and your keenness to seek what is lawful and avoid what is not. We earnestly implore Allah to bless your efforts in this honorable way.
In his response to the question you posed, Dr. Muzammil H. Siddiqi, former President of the Islamic Society of North America, states:
"The committee of scholars, headed by Dr. Yusuf Qardawi met in Detroit in 1999, issued a statement explaining the law of necessity. You may refer to that. Basically, it says that if a person is not able to rent a suitable house for himself and his family in a proper location or the rent is too high, in that case he can purchase the house with a mortgage. Even in the case of permission, the scholars suggested that one should exhaust all the other possibilities of purchasing the house in a pure halal way. For example, one can make an agreement with the seller to sell him the house at a higher price and he pays the sum of what the house is worth through installments. In the language of Shari’ah, this is called al-bay` bil-ajal (purchase through deferred payment). Or there could be other similar methods that could be used if it is not possible to buy a home in any other way except through mortgage and when one is in dire need, one can take benefit from this permission."
You can also read:
The Scope of “Necessity” that Relaxes the Prohibition of Mortgage
Purchasing Houses with Usurious Loan for Muslims Living in Non-Muslim Countries