Worcester Polytechnic Institute has finalized the purchase of two hotels near its campus as part of a plan that has outraged Worcester leaders.

The university confirmed that it acquired the Courtyard Marriott for $25.6 million and the Hampton Inn & Suites for $20.4 million. Both hotels were previously owned by the New York-based company BRE Hotels & Resorts.

WPI leaders have cited a shortage of affordable and accessible housing options for students as the reason for buying the hotels. The school will transition the Hampton Inn to student housing in 2026. The Courtyard Marriott will continue to serve as a hotel through at least 2030.

In an email, WPI said that “by opening more campus-run housing for students, more rental properties in Worcester will be available to families and others seeking affordable housing, alleviating some pressure on the local housing market.”

“We believe the decision to acquire the hotels benefits both WPI and Worcester, and we will continue to have open communication with the City to ensure this purchase provides collective benefits and meets shared goals,” the school said.

Worcester officials have repeatedly denounced WPI’s plans, arguing both hotels were built years ago as part of a state- and federally funded project to revitalize the Gateway Park area near WPI’s campus. City and local business leaders have said the purchase of the hotels amounted to the school using resources created with public money solely for its own personal needs.

Officials have added the city will lose nearly $1.6 million in hotel and property tax revenue every year. That’s because state law exempts nonprofit universities from paying property taxes.

A Worcester spokesman said the city is currently discussing the hotels with WPI, but declined to comment further. In a statement, Tim Murray, president and CEO of the Worcester Regional Chamber of Commerce, criticized the university for not consulting with city and business leaders before purchasing the hotels.

“Instead, WPI’s unilateral decision will take millions of dollars out of the city’s budget for needed city services, raise taxes on businesses and homeowners, eliminate approximately 100 private sector jobs, and further exacerbate Worcester’s hotel room shortage, which negatively impacts some of Worcester’s largest private sector employers,” Murray said.

WPI officials say that both hotels will remain on Worcester’s property tax rolls and will generate hotel tax revenues for the city while they continue operating as they do now. The school added that it has invested more than $140 million in the Gateway Park project master plan and has paid Worcester $9 million since 2009 to support city services in lieu of property taxes.