(Bloomberg) -- Raiffeisen Bank International AG shares rallied after the bank agreed to buy a stake in construction company Strabag SE held by sanctioned businessman Oleg Deripaska in a complex transaction aimed at lowering the two Austrian firms’ Russian exposure.

The bank’s Russian unit will purchase almost 28% of Strabag for €1.51 billion ($1.65 billion) and then transfer the shares to its parent via a dividend in kind, the lender said in a statement Tuesday.

The transaction appears to provide a two-way solution for issues that have mired the companies since the start of Russia’s invasion of Ukraine. Raiffeisen has been looking to withdraw capital stuck at its Russian lender, while Strabag has frozen the shares of Deripaska due to European sanctions.

Raiffeisen’s shares rallied as much as 12% after the announcement. Citigroup Inc. raised its recommendation to buy from neutral citing the prospect for higher earnings.

The bank said the deal complies with sanctions requirements, but will need regulatory approval, including from Russian authorities who need to approve any dividend payments abroad. 

Strabag said earlier Tuesday that Deripaska had sold MKAO Rasperia Trading, the company that held his shares, to another business. That move likely allows Raiffeisen to avoid dealing with the sanctioned businessman directly.

For almost two years, the Viennese lender has been looking to sell or spin off its Russian subsidiary, the largest foreign-owned bank in the country. The unit has racked up more than €3 billion of profits that it’s been unable to send back to its parent due to Moscow’s restrictions on dividends.

Raiffeisen said it would still consider options to deconsolidate the bank, but the Strabag deal would help lower its exposure to Russia in the meantime. The deal, if completed, would raise its closely watched CET1 capital ratio for operations outside Russia by 1.2 percentage points.

For Strabag, the transaction will help complete efforts to squeeze out the Russian businessman, who first invested in the company in 2007 with the promise of boosting business in the country ahead of the Sochi Olympics.

(Adds share price reaction, Citi analyst upgrade from first paragraph.)

©2023 Bloomberg L.P.