The Executive Mansion was retaken by Democrats in 1974 and remained under Democratic control for 20 years under Hugh Carey and Mario Cuomo. Late–century Democrats became more centrist, including US Senator Daniel Patrick Moynihan (1977–2001) and New York City Mayor Ed Koch (1978–1989), while state Republicans began to align themselves with the more conservative national party. They gained power through the elections of Senator Alfonse D'Amato in 1980, Mayor Rudolph Giuliani in 1993, and Governor George Pataki in 1994. New York remained one of the most liberal states. In 1984, Ronald Reagan was the last Republican to carry the state, although Republican Michael Bloomberg served as New York City mayor in the early 21st century.