Google put down a “substantial deposit” on the 15-story building at 111 Eighth Avenue, just north of the meatpacking district, and is expected to close the sale by the end of the year, said the executives, who spoke only on the condition of anonymity because they were not authorized to discuss the deal.

The contract not only signals a rebounding real estate market, at least for office buildings full of high-profile tenants paying good rents, but also reflects a vote of confidence by an expanding technology firm in New York City.

“This decision is further evidence that large-scale buildings are trading once again,” said Ross Moskowitz, a real estate lawyer at Stroock & Stroock & Lavan and a former city economic development official, “and high-end users are looking to take advantage of these opportunities.”

The brick building, which covers an entire block bound by 15th and 16th Streets, already houses Google’s East Coast headquarters and 1,800 employees, as well as Lifetime Entertainment, barnesandnoble.com, Nike USA and Deutsch advertising.

But at 2.9 million square feet, it has more space than the Empire State Building and plenty of room for Google to grow.

The current owners — the New York State Common Retirement Fund; Jamestown, a German investment group; and Taconic Investment Partners — put the building on the auction block in September, hoping to attract foreign investors, private equity firms and other companies scouring the market for investment opportunities.

Douglas Harmon, the broker who handled the sale, snared a dozen bidders.

But Google moved quickly to pre-empt other potential buyers and entered exclusive negotiations with the owners. On Thursday, both sides signed the contract.

Both the sturdy brick building, which has 15-foot ceilings and unobstructed views, and the neighborhood have undergone a remarkable transformation.

The structure was built by the Port Authority of New York and New Jersey in 1932 for port-related businesses.

Taconic and its partners bought the property in 1998 and began stocking the building with telecom companies like Verizon and Sprint and later Deutsch advertising. Taconic is expected to continue managing the property.

As meatpackers moved out of the neighborhood to the south they were replaced by galleries, fashion houses and expensive shops.