The last time New York’s Republican Party won a race for statewide office, Andrew M. Cuomo’s political career was a mess, Donald J. Trump’s political career didn’t exist and George E. Pataki was cruising to a third term as governor.

That was in 2002. Since then, Democrats have won every statewide election, culminating last fall when Mr. Cuomo was handily re-elected to a third term over Marcus J. Molinaro, the Republican Dutchess County executive. The Republicans also lost eight seats in the State Senate, shattering their perennial hold on the majority in Albany’s upper chamber, resulting in an all-Democratic Legislature.

For many party faithful, something had to change. On Monday, that shake-up took place as the party’s longtime chairman, Edward F. Cox, agreed to step aside in the face of a growing rebellion by county chairs, particularly in the more conservative areas in upstate New York.

Many of those county chairs had recently endorsed a leadership challenge by Nick Langworthy, the chair of the Erie County Republican Committee, who will replace Mr. Cox at the end of his term in July .