A commitment letter to the Connecticut Insurance Department was delivered by CVS Health Corp. stating that the company will keep Aetna Inc. in Hartford for at least 10 years.

This reverses CVS’s announcement to move Aetna headquarters, which has been in Hartford since 1853. CVS bought Aetna in December of 2017.

Aetna will keep their current staffing levels in the state for the next four years, at 5,291 employees. Aetna promised a $50 million payment to the city of Hartford over five years, AP News reported. The company will also honor existing philanthropic agreements of Aetna Foundation, a statement from Gov. Dannel P. Malloy said.

“Hartford has been Aetna’s home since 1853 and I am thrilled that the capital city will remain the company’s home for the foreseeable future … I am confident that the city will continue to emerge as a hub for business, and Aetna’s continued presence is the economic backbone for long-term success,” Malloy said in a statement.