By Vipal Monga

TORONTO -- Royal Bank of Canada, Toronto-Dominion Bank Group and Bank of Montreal set aside billions of dollars during their second quarters to guard against defaults by their borrowers. The question now looming for the rest of the year: how much will they need?

"We won't know until the end of the year, or early next if they did enough," said Gabriel Dechaine, an analyst with National Bank. "We're in the first quarter of a downturn. It's hard to say they've washed their hands of this."

Banks set aside money to anticipate losses from loans that may go bad in the future. The large provisioning suggests banks are worried about the economy's health. The move crimps bank earnings, as the money can't be used for more productive purposes.

The largest Canadian banks felt the effects during the most recent quarter, as they braced for potential defaults in their mortgage, auto-loan and credit-card businesses, reflecting the darkening economic outlook caused by the Covid-19 lockdowns.

Royal Bank of Canada, the country's largest bank by market capitalization, reported earnings of 1.48 billion Canadian dollars ($1.07 billion), a 54% drop from last year, largely because it set aside C$2.83 billion for provisional credit losses. TD, RBC's closest rival in terms of market size, posted a 52% drop in quarterly earnings, to C$1.52 billion, after recording a C$3.22 billion loss provision. BMO, which owns Chicago's Harris Bank, suffered an earnings decline of 54% to C$689 million, after booking C$1.12 billion to cover potential losses.

Including Bank of Nova Scotia and Canadian Imperial Bank of Commerce, Canada's five largest banks boosted loss provisions by a combined C$10.43 billion, more than four times the amount they put away a year ago.

Bank executives said during conference calls that they expected the provisions to decline for the rest of the year after the second quarter's big jump.

RBC's chief risk officer, Graeme Hepworth, said the provisioning "has reached the high-water mark," but cautioned that the amounts his bank sets aside in the coming quarters will depend on how the pandemic evolves and the economy recovers.

The remark was echoed by TD's chief risk officer Ajai Bambawale, though he warned the bank's portfolio of impaired loans -- where payments have fallen behind by more than six months -- could increase as the economy struggles.

According to official statistics, Canadian economic output contracted by an annualized rate of 8.2% in the first quarter. Roughly three million Canadians lost their jobs in March and April, and more than a third of the labor force is unemployed or underused. Meanwhile, Canada is the first major economy to be hit with deflation, as consumer prices in April retreated 0.2% year over year.

"We're staring down the barrel of something very extreme," said Steve Theriault, an analyst with Eight Capital in Toronto.

The hit from the coronavirus is worrying economists. Many investors question the fundamentals of Canada's economy, fueled largely by a housing market often termed a bubble. Canadian households are among the most indebted among developed economies, leaving them vulnerable to any prolonged economic slowdown.

Earlier this month, Evan Siddall, the head of Canada's state-owned mortgage insurer, warned that the income shock from the pandemic could increase mortgage delinquencies and depress house prices.

For now, bank executives say they can handle the weakness they see in their lending books.

RBC's chief financial officer, Rod Bolger, said that interest rate reductions by the Bank of Canada and a menu of fiscal stimulus packages could cushion any blow to struggling borrowers.

Canadian homeowners are being allowed by their lenders to defer mortgage payments for up to six months, allowing some breathing room. And, even if homeowners do default, RBC loans are protected by the 42% equity held on average by Canadian home borrowers, a cushion that's "quite healthy," said Mr. Bolger.

But the credit loss provisions are so high even a small movement of the loans to impaired status could represent historic levels for Canadian banks who largely avoided the last financial crisis.

The Bank of Canada said earlier this month that a worst-case scenario for the Canadian economy could result in mortgage arrears rising to 0.8% by the second half of 2021, close to double the peak arrears rate that was recorded toward the end of the global financial crisis in 2009.

Write to Vipal Monga at vipal.monga@wsj.com