New York's highest court on Wednesday rejected the newly drawn districts for the U.S. House of Representatives in New York as well as for the state Senate. The ruling could mean profound changes for New York's political calendar this year and have an impact on when voters will cast ballots.

At the same time, the political implications of the process being taken out of the hands of lawmakers in the Democratic-controlled Legislature could have an even bigger effect on the nation as a whole.

Here's what to know about the redistricting ruling:

1. How did it get to this point?

Every decade, the legislative boundaries for the House of Representatives, the state Senate and state Assembly must be redrawn based on the most recent Census data. The process is known as redistricting, and its stakes have become increasingly important to representation in state capitols as well as in Washington.

In essence, it's a process that involves carving up the state in legislative districts with the stated goal of fair and equal representation in public office. But the process in the hands of elected officials has been ripe for abuse, according to critics. Partisan redistricting, known as gerrymandering, has been blamed for a rise in polarization. As more people ideologically sort themselves into like-minded communities, it's become easier for officials in power to draw districts that are dominated by voters in a single party.

To combat this, New York voters in 2014 approved a constitutional amendment that outlined a new process for redistricting, taking the process out of the hands of lawmakers and empowering an commission appointed by the Legislature to do it.

This was the first year the new commission was charged with drawing the lines, and it could not come to an agreement. So, the process was kicked to the Legislature, controlled by Democratic supermajorities in both chambers. Good-government advocates and Republicans soon cried foul at the new maps drawn by Democrats, and a GOP-aligned lawsuit was filed.

Two lower courts determined the maps were drawn with partisan intent, and the Court of Appeals on Wednesday found both the congressional maps and the state Senate maps are unconstitutional. The state Assembly was unaffected.

2. Who draws the lines now?

The ruling suggests a "special master" should be in charge of drawing the lines. That's an independent expert who is appointed from outside of the state government. A lower court this month appointed Jonathan Cervas, a specialist in Geographic Information Systems at Carnegie Mellon University, to develop new maps for the House and state Senate.

3. Has a "special master" been in charge of the process before?

Yes. In 2012, the Democratic-controlled state Assembly and the state Senate, then under Republican leadership, did not reach an agreement on drawing new congressional maps. A federal court appointed a judge to draw the lines. The result: competitive House races in parts of New York including Long Island, Staten Island, the Hudson Valley and Central New York. The state is not in play in the presidential race, but has been home to multiple battleground House districts over the last 10 years.

4. Why did the court strike down the maps?

The ruling assessed two issues in the Republican-backed legal challenge. First, the lawsuit alleged the process by which lawmakers drew the maps after the commission failed to reach an agreement was in violation of the 2014 amendment. At the same time, the challenge asserted the maps were drawn with partisan intent. Democrats insisted the process was legal, and the maps are the result of a Democratic-dominated state.

But in both instances, the Court of Appeals ruling sided with the Republican claims on both the process and the substance of the maps themselves.

5. What does this mean for the June primary?

This ruling was handed down at a very tricky time for the political calendar. Petitioning was conducted with the new lines in mind. Voters may no longer live in the districts that candidates are running in. Absentee ballots need to be printed and mailed next month. Early voting for the primary begins June 18.

The ruling opened the possibility of moving the primary to August. Lawmakers could set a new date for the state Senate and congressional primaries, and leave the state Assembly races as well as the statewide races for governor and lieutenant governor in June. Or, the entire primary calendar could shift completely to August.

A state Board of Elections spokesman on Wednesday afternoon in a statement said the ruling was under review, but at the same time suggested a split primary was posssible.

"The State Board staff stands ready to assist the Supreme Court in any way we are called upon to quickly develop a new Political Calendar for an August primary for the state Senate and the U.S. House of Representatives," said spokesman John Conklin.

"We do not foresee the June 28th primary changing for our statewide offices, the State Assembly, Judicial Delegates and Alternates and any local offices that are scheduled to be on the primary ballot.  Whatever adjustments need to be made to the ballot access process for candidates for Congress and State Senate for a new primary will be proposed to the court. We will do everything in our power to inform the electorate to ensure a fair and accurate election for the voters of New York.”

It's a complicated outcome and a difficult knot for New York officials to untie, and they have very little time to do it.