Wells Fargo had its best quarter in a year and a half, posting a profit of $4.74 billion and freeing up more than a billion dollars that had been set aside for potential loan defaults at the beginning of the coronavirus pandemic. (All figures are in U.S. dollars.)

The San Francisco–based bank on Wednesday said it earned $1.05 per share on revenue of $18.06 billion in the quarter, both surpassing Wall Street’s forecasts. Analysts surveyed by Zacks were expecting earnings per share of 69 cents and revenue of $17.62 billion.

The biggest U.S. mortgage lender had net interest income of $8.8 billion, a more than 22% decline from the $11.3 billion in the same period last year. Although interest rates have ticked up recently, they have remained low as the Federal Reserve has signalled plans to keep its benchmark borrowing rate near zero until 2023.

The consumer bank released $1.6 billion from its loan loss reserves, acknowledging an improving economy as millions of people get vaccinated and governments scale back pandemic-related business restrictions. The bank said the return of that cash, plus the sale of some student loans, helped boost its earnings by 30 cents per share.

In the same quarter last year, just as the virus pandemic was blowing a hole through the global economy, Wells reported a 90% plunge in profits and set aside nearly $4 billion in loan loss provisions. Wells and other banks set aside the money in preparation for consumers and businesses defaulting on loans due to the pandemic. JPMorgan Chase said Wednesday that it released $5.2 billion from its loan-loss reserves.

Wells Fargo CEO Charlie Scharf said in a statement that low interest rates remain a “headwind” for the bank, but that it remains focused on “appropriate risk and control environment.”

“This is a multiyear effort and there is still much to do, but I am confident we are making progress, though it is not always a straight line,” Scharf said.

Wells has been operating under strict federal guidelines for years, limiting its ability to grow.

In 2018, the Fed capped the size of Wells Fargo’s assets after a series of scandals beginning in 2016 with the uncovering of millions of fake checking accounts its employees opened to meet sales quotas. The Fed lifted that cap last April as part of the federal government’s Payroll Protection Program because many of Wells’ small business customers were getting shut out from applying, but most of the restrictions remain.