July 30 (Reuters) - Canada's Imperial Oil Ltd reported a 7% fall in second-quarter profit on Friday, impacted by planned turnaround activity and weaker realized margins in its downstream refining business.

However, the company continued to post strong output from its largest asset, the Kearl oil sands mine in northern Alberta, which hit a new monthly production record in June.

Due to improved reliability Imperial is switching to one turnaround a year at Kearl, canceling maintenance planned for this fall, and raised 2021 full-year production guidance to 265,000 barrels per day (bpd) from 255,000 bpd previously.

Like its peers Imperial has been benefiting from an increase in global oil prices, although fresh lockdowns and restrictions in some parts of the world to deal with rising cases from the Delta variant of the coronavirus have dented market optimism.

"We're not out of the woods yet," Imperial Chief Executive Brad Corson told an earnings call. "We saw another quarter of increasing commodity prices, but with continued slow recovery in demand."

Calgary-based Imperial, which is majority-owned by Exxon Mobil Corp, said its net income fell to C$366 million ($294.16 million), or 50 Canadian cents per share, in the second quarter ended June 30, from C$392 million, or 53 Canadian cents per share, in the previous quarter.

Downstream recorded net income was C$60 million in the second quarter, compared with net income of C$292 million in the first quarter, the company said.

Total production averaged 401,000 barrels of oil equivalent per day in the quarter ended June 30, down about 7% from the first due to planned oil sands turnarounds.

Imperial's shares were last down 3% at C$33.82 on the Toronto Stock Exchange. ($1 = 1.2442 Canadian dollars) (Reporting by Sahil Shaw in Bengaluru and Nia Williams in Calgary; Editing by Krishna Chandra Eluri and Chris Reese)