Ed Cox, the longtime chairman of the New York state Republican Party, will step down to raise money for President Donald Trump’s reelection campaign.

Trump’s campaign announced the move Monday. It comes as Cox faced a strong challenge for the party chairmanship from Erie County GOP Chairman Nick Langworthy, who will now take over as chairman when Cox steps down in July.

“Ensuring President Trump is re-elected is the most critical task at hand and I’m honored to take on the important role of helping deliver the resources he needs for a huge victory next year,” Cox said in a statement emailed to reporters.Trump campaign manager Brad Parscale called Cox “a fantastic state party chairman” and said he “can’t think of anyone better” to join Trump 2020’s campaign finance team.

FILE - In this Jan. 11, 2017 file photo, New York Republican Chairman Ed Cox pauses to talk with reporters after New York Gov. Andrew Cuomo's State of the State address in Albany, N.Y. Cox, New York's longtime Republican party leader, will step down from his position to join President Donald Trump's 2020 campaign, where he'll work to raise money for the Republican president's re-election bid. (AP Photo/File, Hans Pennink)
FILE – In this Jan. 11, 2017 file photo, New York Republican Chairman Ed Cox pauses to talk with reporters after New York Gov. Andrew Cuomo’s State of the State address in Albany, N.Y. Cox, New York’s longtime Republican party leader, will step down from his position to join President Donald Trump’s 2020 campaign, where he’ll work to raise money for the Republican president’s re-election bid. (AP Photo/File, Hans Pennink)

Langworthy, 38, had recently won the support of several key county party chairs and appeared poised to win his challenge. A telephone message left for him on Monday was not immediately returned.

Cox, a 72-year-old Manhattan attorney, has led the state GOP since 2009. He is the son-in-law of the late President Richard M. Nixon.

Some Republicans had called for a change in leadership following recent GOP election losses.

Last fall, the party lost control of the state Senate, giving up their last bastion in a state where registered Democrats outnumber Republicans by a more than a 2-1 margin. Even before winning the state Senate, Democrats already enjoyed an overwhelming majority in the Assembly and hold all four statewide offices and both U.S. Senate seats.

“Chairman Nick Langworthy is a breath of fresh air in New York’s Republican political climate,” Rockland County GOP Chairman Lawrence Garvey said in a statement. “He brings an energy and passion that we haven’t seen in years and I’m excited to work with him. We must unite and focus on the larger task at hand, rebuilding the NYGOP.”