One of downtown St. Paul’s largest employers is moving its headquarters — but not very far.

Ecolab, the St. Paul-based water, hygiene and energy technology company, said Thursday it has agreed to buy the pyramid-topped Travelers tower just a couple of blocks west of its current headquarters on Wabasha Street. Terms of the sale, which is expected to close during the third quarter of 2015, were not disclosed.

The company plans to relocate all 1,500 of its downtown employees into the 17-story building by the end of 2018. The Travelers sign will come down, Ecolab’s will go up.

“This move affirms our long-standing commitment to downtown St. Paul,” Ecolab CEO Doug Baker said in a news release. “We’re excited that we’re able to bring all of our downtown employees together in one location, which will become the new world headquarters for Ecolab.”

Rumors that Ecolab was interested in the building began to circulate shortly after insurer Travelers Cos. confirmed in January that it was in talks to sell its landmark downtown tower. The St. Paul Cos. built the tower in 1989. The St. Paul merged with Travelers in 2004, and local staffing levels have declined from as many as 3,000 as the insurer consolidated its operations.

Travelers, which has said it has no plans to pull out of downtown St. Paul, is consolidating its 2,100-employee workforce into its smaller south building across Sixth Street from the distinctive tower. Travelers lists its headquarters jointly in St. Paul, New York and Hartford, Conn.

The Travelers building is valued at $36.8 million, according to 2014 Ramsey County property records; the accompanying land is valued at $6.7 million.

Ecolab’s downtown workforce will trade 462,000 square feet of office space, spread out over three buildings along Wabasha, between Fourth and Sixth streets, for 484,500 square feet of “newer and more modern” accommodations in the Travelers tower, Ecolab spokesman Roman Blahoski said. The building includes a cafeteria, on-site day care and under-the-building parking.

The company’s leases on its 19-story Ecolab Corporate Center and its 15-story Ecolab University building expire in 2018 and 2019, respectively. The company owns the six-story Ecolab Communications Center across Fifth Street, and is exploring whether to sell or lease it after the move, Blahoski said.

St. Paul Mayor Chris Coleman announced the pending sale in his State of the City Address on Thursday evening, thanking Ecolab and Travelers for their continued commitment to St. Paul.

We are extremely grateful that both companies choose to call this city their home,” Coleman said.

In addition to its downtown corporate offices, Ecolab has 1,100 employees at its Schuman Campus in Eagan, which houses its research and development operations, and another 100 at its Engineering Center in Eagan. The company offers sanitary products and services to commercial customers such as restaurants, hospitals and factories; it also has acquired operations in water treatment and oil-field services in recent years. The company employs 47,000 people worldwide and had sales of $14 billion in 2014.

Ecolab, which was founded in St. Paul in 1923 as Economic Laboratories, moved its headquarters to downtown St. Paul in 1933 from University Avenue.

It remains to be seen what the move will mean for downtown St. Paul’s commercial real estate market, which had a vacancy rate for leased office space of 20.5 percent in 2014, according to data collected by the Greater St. Paul Building Owners and Managers Association.

The move will likely also impact businesses in the St. Paul skyway, which are frequented by Ecolab employees during the workday; the Travelers tower is not attached to the skyway system.

Nick Woltman can be reached at 651-228-5189. Follow him on Twitter at @nickwoltman.

Correction: A previous version of this article incorrectly reported the year the Travelers Tower was built.