The two fiercest rivals in the commercial real estate information marketplace will become one powerhouse. CoStar Group Inc. (Nasdaq: CSGP) has signed a definitive agreement to acquire archrival LoopNet Inc. (Nasdaq: LOOP), a giant in the online commercial real estate marketplace.

Just two years ago, the two companies were locked in a legal battle in three states over copyright, Web access and advertising issues.

Pursuant to the merger agreement, LoopNet shareholders will receive $16.50 in cash and 0.03702 shares of CoStar Group common stock for each share of LoopNet common stock, representing a total equity value of approximately $860 million and an enterprise value of $762 million.

The boards of directors of both companies have unanimously approved the transaction, which is expected to close by the end of 2011.

Based upon results in the first quarter of 2011, the combined companies have annualized revenue of approximately $321 million. CoStar is headquartered in Washington, D.C. and LoopNet is based in San Francisco.

CoStar operates the largest commercial real estate information database with more than 77 billion sq. ft. of office, retail, and industrial inventory, 1.5 million listings, and 10.6 million images.

LoopNet.com is the industry’s largest and most heavily trafficked online marketplace with 4.8 million registered members and more than 6 million unique visitors quarterly, according to Google Analytics. LoopNet also is the leading website for marketing commercial property listings.

As commercial real estate brokers and owners continue to move property listings to online channels, CoStar anticipates that LoopNet’s marketplace will become increasingly important to buyers and sellers searching for or marketing properties.

“We expect the scale, complementary service capabilities and diversified client and geographic footprint created by the combination of CoStar and LoopNet will drive significant revenue opportunities and cost-saving synergies,” said Andrew Florance, president and CEO of CoStar, in a press release.

“CoStar revolutionized how the industry researches commercial real estate, and LoopNet revolutionized the way the industry markets commercial real estate,” added Florance.

The transaction will double the size of CoStar’s paid subscriber base to at least 160,000, which represents approximately 15% of the estimated one million participants in the commercial real estate market.

With the addition of LoopNet’s complementary listings, CoStar will have a database with approximately two million active listings.

CoStar officials stated in the press release that the merger will provide more widespread market coverage for customers ranging from large, national brokerage and institutional market players to small, local brokers and owners.

The commercial real estate market is one of the largest asset classes in the United States with over $11 trillion in value. The potential size of the industry providing marketing and information services to commercial real estate professionals, according to CoStar, is approximately $30 billion.

On Wall Street, CoStar’s stock closed Wednesday at $61.38 per share, up from $44.71 a year ago.