Alexion Pharmaceuticals Inc. will have to repay Connecticut for a $20 million loan and $6 million grant — plus penalties and interest — because of its decision to move its headquarters from New Haven to Boston, a state official said Tuesday.Alexion CEO Ludwig Hantson said Tuesday the company plans to move about 400 employees from New Haven to Boston by mid-2018. Boston offers access to a “larger biopharmaceutical talent pool and a variety of life-sciences partners to further support future growth initiatives,” Hantson said.Hantson is familiar with Boston. Prior to taking the job at Alexion six months ago, Hantson headed Baxalta Inc., which opened a drug research facility in Cambridge, Massachusetts, in 2015. Hantson also owns property in Wareham, Massachusetts, according to property records.Alexion said about 450 of the New Haven facility’s roughly 1,000 employees will remain based in the city in the company’s “Center of Excellence,” where they will work in Alexion’s research laboratories.Economic and community development Commissioner Catherine Smith said Alexion’s decision to move its headquarters out of the state is “very disappointing, especially in light of how supportive the state has been to the company over the years as it has grown into what it is today.”Although the company will continue to use its New Haven facility, Smith said, Alexion will have to repay the state “in accordance to the terms of our agreement.”Smith added, “Setbacks like this, though unfortunate,” do not deter the Department of Economic and Community Development from pursuing “smart policies and ventures with growing companies in our state.”Alexion spokeswoman Kim Diamond said the company “is in discussions with the state of Connecticut and will meet our obligations as outlined in the agreement.”Diamond also said that the New Haven facility’s “world-class” research and development employees “are responsible for Alexion’s initial success and are vital to our ability to continue to advance” the company’s innovations.“Alexion is committed to the New Haven community and to contributing to New Haven being a vibrant and engaging place to work for our employees,” she said.Senate President Martin M. Looney, D-New Haven, said, “It’s unfortunate that federal investigations and poor financial investments are forcing Alexion to lay off thousands of workers worldwide and shutter some of its facilities, including in Rhode Island next door.“Certainly Connecticut has been a very strong business partner with Alexion, investing millions of dollars and a great deal of time and resources in growing the company right here in Connecticut. But there are some business decisions which are out of the control of state government.”Alexion started in 1992 in New Haven then moved to Cheshire for 16 years before moving back to New Haven in 2012 with assistance from the state’s First Five investment program.The DECD granted Alexion a $20 million loan based on creation of 200 to 300 jobs, which it did.The company also got a $6 million grant for lab construction and was eligible for up to $25 million in Urban and Industrial Sites Reinvestment tax credits.