NEW YORK (Reuters) - M&T Bank Corp (MTB.N) said on Friday it agreed to buy Provident Bankshares Corp (PBKS.O) in an all-stock deal valued at around $400 million in an effort to expand its branch network in the U.S. mid-Atlantic region. Provident Bankshares, based in Baltimore, is the second major bank in Maryland to agree to sell itself this month. U.S. banks are broadly looking to expand their branch networks to boost their reliance on stable funding from deposits as borrowing in debt markets becomes increasingly expensive and unreliable.