HARTFORD, CT — It’s official. Aetna is moving its corporate headquarters from Hartford to New York City.

The company made that announcement on Thursday, stating the move will happen sometime “late in 2018.”

In making the announcement Aetna Chairman and CEO Mark T. Bertolini sent an ominous warning to Hartford about what the future holds, while praising New York City as “a knowledge economy hub, and a driver of the innovations.”

“Aetna’s long-term commitment to Connecticut will be based on the state’s economic health,” Bertolini said in a public statement on the company’s website. “The company remains hopeful that lawmakers will come to an agreement that puts Connecticut on sound financial footing, and that the state will support needed reforms to make Hartford a vibrant city once again.”

In Thursday’s statement, Aetna said the move will have “minimal impact on Aetna’s Connecticut-based associates.”

Aetna is the second big name company in the past two years to announce it would move its headquarters from the mostly suburban state of Connecticut to a more urban setting. General Electric announced it was leaving Fairfield for Boston in January 2016.

GE’s decision was based largely on the pool of young talent from universities and colleges in the Boston area, and the desire of millennials to live in metropolitan areas where they don’t have to own a car to get to work.

Connecticut has been trying how to figure out how to create more vibrant urban settings for younger workers, but those discussions have been on hold while it tries to resolve its fiscal crisis. And the state’s recent investments in public transit have been panned by many Republicans and critics of the Malloy administration.

The General Assembly hasn’t adopted a two-year budget and the new fiscal year starts in two days.

But Gov. Dannel P. Malloy hasn’t given up all hope.

“While Aetna has decided to move 250 jobs to New York City, the vast majority of their nearly 6,000 employees in Connecticut will stay here,” Malloy said in a statement Thursday. “At the same time, this is an important reminder that to be competitive, Connecticut state government must immediately take the necessary steps to produce a balanced biennial budget with recurring measures to reduce spending and structural solutions to our long-term problems. We must also continue to invest in the revitalization of our cities.”

Malloy said his budget protects cities and will help them grow into exciting places to live and work.

“Make no mistake — Hartford is experiencing a transformation with hundreds of new housing units, a major university campus moving downtown, and an arts and culture scene that grows more vibrant each and every day,” the governor said. “It is imperative that we act expeditiously in taking the necessary steps to address our long-term challenges head-on so that we are able to provide predictably for businesses and taxpayers alike.”

House Republican Leader Themis Klarides noted that “on the way out the door the company cited our state’s fiscal crisis as a key element in what, if any, corporate profile will remain in the future. As lawmakers, this should be a motivating factor as we work to solve this looming financial disaster.”

She said unless the state gets at the root cause of these corporate decisions, then other states will continue to steal Connecticut companies.

“We must get our fiscal house in order,” Klarides said.

Connecticut’s loss is New York’s gain, as Aetna already has an established presence in the city, including operations in Harlem.

“Aetna’s decision to call New York home is another testament to the Empire State’s extraordinary economic momentum,” New York Gov. Andrew Cuomo said. “New York has a deep, diverse talent pool and pro-growth environment that businesses need to succeed, and today more companies are choosing New York to grow and diversify their business.”

Aetna has been in Hartford for 164 years.