Lower interest rates and volatility in the markets took a toll on Ameriprise Financial's bottom line in the second quarter.

The Minneapolis-based financial-services firm lost $539 million in the three months ended June 30, compared to a profit of $492 million in the same quarter a year ago.

But its results beat analysts' expectations. When adjusted for various items, it earned $333 million, or $2.64 a share, which was down 35% from a year ago. It also was affected by the reversal of a tax benefit in the first quarter.

"Ameriprise delivered another good quarter with strong underlying business results in the face of substantial headwinds from low interest rates and a difficult operating environment due to the pandemic," CEO Jim Cracchiolo said in a statement. "The powerful combination of our client experience, diversified business and financial strength continues to differentiate Ameriprise."

The company noted that it saw "strong organic growth" in the quarter with $4.9 billion in wrap net inflows into its wealth-management business and $2.6 billion into its asset-management business. But it was challenged by lower interest rates and lower average equity markets.

Its adjusted operating net revenue declined 6% to $2.8 billion.

Ameriprise added that 95% of its employees continue to work from home during the pandemic.

The company's shares have largely tracked the broader market this year. Through Wednesday, Ameriprise shares were down 5.8% since the start of the year, compared to a 1% decline in the S&P 500 and a 7.5% drop in the Dow Jones industrial average.