Loan in the Form of Buying Shares

Question
A person applied to Safwa Islamic Bank for a loan for construction, and the bank informed him that they would give him a loan of 'twenty thousand and five hundred dinars' as shares 'meaning they will make him buy shares with this amount' and then they will offer these shares for sale, which may profit beyond the twenty thousand and five hundred, or may incur losses. After selling them to a third party, they will give this person the cash value of the sale of those shares. Is this loan in this form permissible according to Sharia and is there no sin in it?
Answer
I say, and with God's help: this loan is valid according to Sharia, and God knows best.
imam icon

Send your question to the smart assistant

If the previous answers are not appropriate, please send your question to the Mufti via