Real-estate giants Zillow and Trulia have inked a merger agreement, under the terms of which Zillow is acquiring Trulia in  a $3.5 billion stock-for-stock transaction. The transaction is expected to close in 2015.

At closing, Trulia CEO Pete Flint will remain as CEO of Trulia reporting to Zillow CEO, Spencer Rascoff, and will join the board of directors of the combined company. In addition, at closing, a second member of Trulia’s board of directors will join the board of the combined company. The combined company will maintain both the Zillow and Trulia consumer brands.

Zillow co-founders Rich Barton and Lloyd Frink, who control a majority of the shareholder voting power of Zillow, have agreed to vote in favor of the transaction. In addition, Trulia directors holding 7.4% of Trulia stock have entered into voting agreements with Zillow to vote in favor of the transaction.

Goldman Sachs acted as the exclusive financial advisor, and Shearman & Sterling and Perkins Coie acted as legal counsel to Zillow. J.P. Morgan Securities acted as a financial advisor, and Goodwin Procter and Wilson Sonsini Goodrich & Rosati acted as legal counsel to Trulia. Qatalyst Partners also acted as a financial advisor to Trulia.

In June, Zillow reported a record 83 million unique users across mobile and Web. For the same month, Trulia reported a 54 million monthly unique users across its sites and mobile apps, according to a statement by the companies.

[Image courtesy: Zillow]