Canadian National Railway Co. lowered its earnings forecast for the year amid falling profits and revenue last quarter and a sluggish economic environment.

Canada's largest railway said Tuesday it now expects flat to slightly negative adjusted diluted earnings in 2023, instead of the mid-single-digit growth it predicted three months ago.

Lower consumer demand as well as disruptions caused by wildfires reduced freight service over the second quarter, particularly for containers and lumber products, CN said.

But chief executive Tracy Robinson said the company's goal of ramping up profitable growth through 2026 and beyond remains on track.

“The longer-term fundamentals remain strong. The growth opportunities are real," she told analysts on a conference call, noting that on-time performance, safety and velocity metrics all improved from 2022.

However, "a little more weakness on the economic front” means overall shipments will likely continue to drop throughout the year, Robinson said. Softer demand, especially for container cargo, will likely continue into 2024, she added.

The forecast marks a contrast to the sunny outlook offered by the CEO three months earlier, despite expectations of a shrinking economy throughout much of the year.

A roughly two-week strike at B.C. ports earlier this month halted freight flows through West Coast terminals, adding to the demand woes.

The disruption will have a "minor impact" on earnings this quarter, said chief marketing officer Doug MacDonald. He projected it will take eight weeks to clear the backlog caused by the labour action.

In the second quarter ended June 30, net income fell by 12 per cent to $1.17 billion from $1.33 billion a year earlier, CN reported.

Revenues in its second quarter dropped seven per cent to $4.06 billion from $4.34 billion in the period a year earlier.

On an adjusted basis, diluted earnings per share decreased nine per cent to $1.76 from $1.93 the year before. Analysts had expected $1.82, according to financial markets data firm Refinitiv.