Montreal-based National Bank of Canada had $497 million of net income in the first quarter (Q1), nearly double its profit of $261 million in the comparable period the previous year.

That was when the bank was hit by a $236-million writeoff of its investment in another financial group

Net income equalled $1.34 per share, up from 67¢ per share in the first quarter of 2016.

After excluding certain items, National Bank earned $502 million in the three months ended Jan. 31, up from $427 million last year.

The bank’s adjusted earnings amounted to $1.35 per share, up from $1.17 per share a year earlier and above the estimate of $1.26 per share compiled by Thomson Reuters.

National Bank also benefited from strong revenue growth at its wealth management and financial markets segments, moderate revenue growth from banking and improved efficiency across its main Canadian business operations.

Revenue rose to $1.63 billion from $1.29 billion.

Read: Bright outlook for Canada’s Big Six banks

Read: BMO, Scotiabank beat expectations