Bank of America posted a gain in market share for Bay Area deposits during fiscal 2012, keeping the No. 1 spot it holds in the region, primarily at the expense of the No. 2 bank in the nine-county region, San Francisco-based Wells Fargo Bank.

Over the 12 months that ended in June, Bank of America had 41.1 percent of its deposits, by dollar amount, in the Bay Area . B of A posted a gain over the June 2011 share of 37.8 percent, according to an annual survey released Tuesday by a key bank regulator, the FDIC.

Wells Fargo had 20 percent of the deposits in the Bay Area at the end of June, down from the 21.9 percent deposit market share in June 2011.

Rounding out the top five in the Bay Area: Citibank had 6.3 percent on June 30, down from 6.8 percent the year before; Chase Bank had 4.5 percent, down from 4.6 percent; San Jose-based Silicon Valley Bank had 4.2 percent, up from 4.1 percent. Chase lost share despite a big push to open new branches in the region.

The remainder of the top 10 in the Bay Area consisted of San Francisco-based First Republic Bank, which gained share to reach 3.7 percent; San Francisco-based Bank of the West which slipped to 3.3 percent; San Francisco-based Union Bank, unchanged at 2.3 percent; Comerica Bank which gained share to 1.9 percent; and US Bank, which lost share to 1.7 percent.