By Anil D'Silva and Neha Dimri

(Reuters) - Wells Fargo & Co <WFC.N>, the largest U.S. mortgage lender, reported a drop in quarterly profit for the first time in five years as employee costs rose at a time margins are under pressure from low interest rates.

Banks are struggling to boost margins as persistent low interest rates and stricter capital requirements offset any benefit from cost-saving initiatives.

Low rates have prevented Wells Fargo and its regional rivals from capitalizing on their growing deposit base. Net interest income has also come under pressure as lower-yielding loans replace higher-yielding assets.

Wells Fargo's shares fell 2 percent to $53.58 on Tuesday.

The bank's net interest margin, a key measure of profitability, fell to 2.95 percent in the first quarter ended March 31 from 3.20 percent a year earlier.

Non-interest expense rose about 5 percent to $12.51 billion, mainly because of higher employee costs as the bank expanded its workforce and paid incentives to retirement-eligible employees.

Wells Fargo's employee base rose to 266,000 in the quarter, S&P Capital IQ analyst Erik Oja said. The bank had 265,000 employees at the end of 2014.

"But we aren't standing still (on costs)," Chief Executive John Stumpf said. "We watch every expense around here as we repurpose dollars we save into things we have to invest in."

The bank, however, reported a better-than-expected profit as mortgage banking revenue rose after four quarters of decline, helped by a surge in refinancing.

The average 30-year mortgage rate fell to as low as 3.59 percent in the first quarter, the lowest in nearly two years, according to the Federal Home Loan Mortgage Corp. Rates in the year-earlier quarter averaged 4.35 percent on a monthly basis.

Wells Fargo's revenue from mortgage lending rose 2.4 percent to $1.55 billion.

The bank said on Friday it was buying commercial real estate loans valued at $9 billion from GE Capital.

Mortgage applications in the pipeline surged to $44 billion as of March 31 from $26 billion at December-end.

JP Morgan Chase & Co <JPM.N>, which also reported results on Tuesday, said quarterly net income from mortgage banking rose nearly three-fold.

Net income applicable to Wells Fargo's common shareholders fell about 2.7 percent to $5.46 billion, or $1.04 per share.

Revenue rose 3 percent to $21.28 billion.

Analysts on average had expected earnings of 98 cents per share and revenue of $21.24 billion, according to Thomson Reuters I/B/E/S.

(Editing by Kirti Pandey)