A pair of settlements announced Monday will bring Bank of America closer to eliminating its mountain of liabilities stemming from the housing crisis, at a time when the behemoth bank continues to retreat from the mortgage market.

Bank of America disclosed a $10.3 billion agreement with Fannie Mae to resolve claims over troubled home loans that saddled the mortgage-finance giant with billions of dollars in losses once they soured. The bank was also named in a separate action as one of 10 institutions, including JPMorgan Chase and Wells Fargo, that agreed to pay $8.5 billion to settle allegations of foreclosure abuse.

Contending with the barrage of lawsuits over mortgage securities and residential foreclosures has made Bank of America wary of anything other than issuing vanilla home loans. Barely four years ago, Bank of America was the dominant player in the mortgage market with a hefty portfolio inherited from its acquisition of Countrywide Financial.

But that deal became an albatross that the bank has fought hard to loosen. Analysts estimate that Bank of America has lost nearly $40 billion on mortgage litigation and repurchases of soured loans tied to Countrywide. The fallout from the deal has led the bank to reduce its participation in the mortgage industry, leaving the market in the hands of fewer players to the detriment of borrowers.

“You have less competition, and as a result the pricing has gotten worse,” said Guy D. Cecala, publisher of Inside Mortgage Finance, a home-loan publication. “Mortgage rates should probably be closer to 3.25 rather than 3.5. One of the reasons they aren’t is because banks aren’t that competitive and don’t have to be to get business.”

Buying Countrywide grew Bank of America’s market share in mortgage originations from 7.8 percent in 2007 to 21.6 percent in 2009. That number has fallen to 4.2 percent as of September 2012, according to an analysis by Inside Mortgage Finance. Wells Fargo, with about 30 percent of the market, has supplanted Bank of America as the nation’s largest mortgage lender. JPMorgan trails in second place with 10.3 percent.

“If we want to open up competition, we not only have to show a willingness to settle the litigation but also make it a more favorable environment for lenders,” said Christopher Mayer, a professor of real estate finance and economics at Columbia University. “There is too much uncertainty in the market, which is making lending unattractive.”

Mayer said policymakers need to clearly define the new parameters of the mortgage market, such as reforming Fannie Mae and Freddie Mac, to give lenders more certainty. Until then, the mortgage industry will continue to consolidate.

Cecala expects the void left by Bank of America will eventually be filled by other lenders who will step up their businesses once there is more clarity about the future of the mortgage industry. In the interim, the mortgage market will likely remain in the hands of a few well-heeled players.

Officials at Bank of America say the bank has not completely given up on the housing market, but it is focused on reducing risk. To that end, Bank of America has stopped buying loans from other lenders in what is known as wholesale deals. Those kinds of deals represented nearly half of Bank of America’s mortgage business four years ago.

“Mortgages are important to us, and we want to provide the product for our customers in the retail part of the business,” Bank of America spokesman Jerome Dubrowski said. He noted that the bank has increased the share of home loans it issues directly to borrowers from 6 to 8 percent in the past year. “What we don’t want is to be in the wholesale end, where the margins are much less and the risk is much greater,” he said.

One of the riskier parts of the home-loan business that Bank of America is exiting is mortgage servicing. In a pair of separate deals, the bank agreed to sell the servicing rights on $306 billion worth of home loans to Nationstar Mortgage Holdings and Newcastle Investment.

Servicing expenses were a drag on the bank’s profits in recent quarters as borrowers fell behind on payments. At one point in 2009, Bank of America held more than 20 percent of the mortgage-servicing market but reduced its exposure to 14.7 percent as of September, according to Inside Mortgage Finance.

Bank of America made note of the servicing rights transactions as part of a broader discussion of its settlement with Fannie Mae. The settlement calls for the bank to spend $6.7 billion to buy back about 30,000 troubled mortgages from Fannie at a discount from their original value. The bank will also make $3.6 billion in cash payments to the government-owned mortgage giant. A similar deal was struck in 2011 between the bank and Freddie Mac.

Fannie and Freddie have been saddled with billions of dollars in losses stemming from shoddy mortgages that were sold to them in the lead-up to the housing crash. The twin mortgage giants have accused Coutrywide, among others, of misrepresenting the quality of its loans in an attempt to rake in profits. Through the third quarter of 2012, Bank of America has paid $14 billion related to repurchases of soured loans.

Speaking about the settlement and servicing transactions, Bank of America chief executive Brian Moynihan said in a statement on Monday: “Together, these agreements are a significant step in resolving our remaining legacy mortgage issues, further streamlining and simplifying the company and reducing expenses over time.”

Bank of America said the settlement will reduce its pretax earnings in the fourth quarter by roughly $2.7 billion. The bank has not disclosed anticipated costs tied to the latest foreclosure settlement it reached with the Federal Reserve and Office of the Comptroller of the Currency.

Regulators are not disclosing estimated individual costs for each of the 10 banks involved in the $8.3 billion deal. The agreement will effectively end a review process of foreclosure files that was required under a 2011 enforcement action from the OCC.

Consumer advocates are criticizing the foreclosure deal as a gift to banks. They say the amount is too low and the deal allows banks to shirk their responsibility for payouts that might have cost them more.

“The capped pool of cash payments is wholly inadequate in light of the scale of the harm,” said Alys Cohen, staff attorney for the National Consumer Law Center. “If the reviews had been done right the first time, banks would have been on the hook to pay far more to homeowners.”