Bank of Nova Scotia’s quarterly profit rose 57% on the back of a gain from the sale of the corporate headquarters in Toronto, and Canada’s No. 3 lender raised its quarterly dividend, it said on Tuesday.

Toronto-based Scotiabank said it had earned $2.1 billion, or $1.69 a share, in the third quarter ended on July 31, compared with $1.3 billion, or $1.10 a share, a year earlier.

Stripping out a $614 gain from the office sale and other items, the profit was $1.22 a share, just ahead of the analysts’ average estimate of $1.19, according to Thomson Reuters I/B/E/S.

The bank said it was trying to take advantage of Toronto’s red-hot commercial office market, but analysts said the positive offshoot of the deal was that it strengthened Scotiabank’s capital position just head of the implementation of stricter Basel III capital rules in 2013.

The bank raised its quarterly dividend by 2 cents to 57 Canadian cents a share.