LOS ANGELES (AP)  Standard Pacific Corp. and Ryland Group Inc. have agreed to merge in an all-stock transaction that will create a single homebuilder with operations in 17 states.

The merger marks the first big move toward consolidation among the major publicly traded homebuilders in years and comes as the U.S. housing market continues to gradually regain its footing after years in a deep slump.

The two California-based homebuilders said late Sunday that their boards of directors unanimously agreed to go forward with “a merger of equals” that would form a company with an equity market capitalization of about $5.2 billion.

Ryland was the fifth-ranked U.S. homebuilder last year, based on home closings, while Standard Pacific was 11th, according to Builder magazine. Together, the builders accounted for 12,633 home closings last year, which would make the combined company the fourth-biggest builder. The top three are D.R. Horton, Lennar Corp. and PulteGroup.

Executives at Standard Pacific and Ryland said the merger will create a company that can sell homes potentially to a broader array of buyers. The new company would also own or control roughly 74,000 land parcels for homes.

“We believe we”re in the middle innings of the homebuilding cycle,” Scott Stowell, CEO and president of Standard Pacific Homes, said in an interview. “We”re able to integrate the company, position it with approximately 540 active selling communities, so that we can fully capitalize on the housing market recovery.”

Standard Pacific sells homes in California, Arizona, Colorado, Texas, Florida and the Carolinas and caters primarily to move-up buyers, or homeowners looking to sell their home and buy a new one. Ryland Group sells homes in 17 states and builds homes aimed to everyone from first-time homebuyers to high-end homes.

“It seems to be a good fit,” said Alex Barron, president and founder of Housing Research Center, an independent equity firm in El Paso, Texas. “There are some advantages potentially in terms of cost of labor, cost of materials, if you”re perceived to be a bigger builder.”

Job gains over the past year have put homebuyers in a stronger financial position, which has helped drive sales of new homes this year. Through the first four months, sales of new U.S. homes were running 23.7 percent higher than in the same period last year.

Homebuilders have benefited from a tight supply of available homes for sale, which have driven home prices higher. Over the past 12 months, the median sales price for new homes has risen 8.3 percent to $297,300.

In April, new home sales climbed 6.8 percent to a seasonally adjusted annual rate of 517,000. Still, sales remain below the 700,000 pace that economist say indicates a healthy market.

“We”re in the early stages of recovery, so we”re looking for that slow, steady growth,” said Larry Nicholson, Ryland”s president and chief executive. “We see the opportunity to put the two (companies) together, strengthen our market positions, take some costs out of the business, put more money to the bottom line, become a much more efficient organization, while continuing to grow it, which gives you a lot of benefits in the market.”

Ryland and Standard Pacific estimate that the merger could result in annual cost savings of $50 million to $70 million for the new company. A significant amount of those savings could be reaped by late next year, the companies said.

The executives declined to say how many jobs could be eliminated as a result of the merger.

Under the terms of the merger, Standard Pacific will conduct a 1 for 5 reverse stock split. Afterward, Ryland shareholders will receive 1.0191 shares of Standard Pacific stock in exchange for each Ryland share.

Standard Pacific shareholders will end up with about 59 percent ownership of the combined company, while Ryland shareholders own 41 percent.

Nicholson would become CEO and president of the combined company, which will operate under a new name to be disclosed once the merger is complete. Stowell will become executive chairman of the new company”s 10-member board, which will be split between board members from Standard Pacific and Ryland.

The deal, which must be approved by shareholders and clear any regulatory hurdles, is expected to close in the fall.