Wells Fargo & Co. (NYSE:WFC) dethroned Wal-Mart Stores Inc.’s (NYSE:WMT) seven-year run as the country’s top corporate philanthropist, giving $315.8 million in cash to charity programs compared to the big-box retailer’s $311.6 million, according to a survey published Monday.

The Chronicle of Philanthropy’s corporate survey for 2012 found that Wal-Mart fell to No. 2 last year, but expected to donate more in 2013, while the nation’s No. 1 mortgage lender -- hot off a better-than-expected second quarter -- expected to give less.

Still, the bank -- along with other financial firms that have ranked high on the list since the 2008 financial crisis -- bolstered its annual giving with a $77 million grant to NeighborWorks America, a group that helps low-income families find affordable housing.

Wells Fargo faced demonstrations earlier this year by the Alliance of Californians for Community Empowerment and the Home Defenders League, both of which rallied outside bank locations to protest foreclosures on homes.

“A lot of big financial companies have stepped up their giving for the last few years,” Peter Panepento, the Chronicle’s assistant managing editor, told International Business Times. “Part of it is that they do want to show themselves as good stewards and good partners in some of the communities where they’ve gotten criticism in the past.”

“If you look at our top 10,” he added, “four of them are financial companies.”

He said total giving was up 2.7 percent last year. With the global economy still stranded in uncertain straits, he expects companies to continue to commit small increases of money to philanthropy in the next year.

“Companies aren’t willing to make big investments in philanthropy given the insecurity with the economy,” Panepento said. “They’re doing a lot of in-kind gifts and encouraging volunteer programs among employees. I would say that we’re expecting the trend of incremental small increases in giving to continue this year throughout 2013.”

Of the 106 companies surveyed, the top five, ordered from greatest to least, were: Wells Fargo, Wal-Mart, Chevron Corporation (NYSE:CVX), Goldman Sachs Group (NYSE:GS) and ExxonMobil Corporation (NYSE:XOM).