Chicago-based private equity firm Thoma Bravo LLC is purchasing mortgage software company Ellie Mae Inc. for $3.7 billion.

Ellie Mae said that its shareholders will get $99 in cash for each share they hold, representing a premium of 21 percent to the stock’s Monday closing price.

U.S.-based investment bank Jefferies provided financing for the deal. JPMorgan was Ellie Mae’s financial adviser and Jefferies advised Thoma Bravo.

The transaction is expected to be completed in the second or third quarter of 2019.