The Supreme Court on Wednesday heard oral arguments on partisan gerrymandering — the justices' second major case of its type in recent months.

Gerrymandering refers to the practice of drawing political districts that give one party a lopsided advantage over the other in an election.

Justice Anthony Kennedy is viewed as the swing vote in both gerrymandering cases, and the court is expected to issue a ruling in June.

The Supreme Court on Wednesday heard oral arguments for the second of two highly anticipated cases within the last six months on partisan gerrymandering — the outcomes of which could essentially overhaul the American election process.

Gerrymandering has become an increasingly divisive issue in recent years, as lower courts have begun striking down what they view as overtly partisan redistricting that tilt elections toward the political parties that draw their districts' maps.

In the first case, Gill v. Whitford, which the justices heard oral arguments for in October, Democrats accused Republicans of benefiting from the practice. In Tuesday's case, Benisek v. Lamone, Republicans accused Democrats.

So far, the justices have shown themselves to be sharply divided over whether they should intervene in instances of extreme gerrymandering. But all eyes are on Justice Anthony Kennedy, who is viewed as the swing vote in the case.

Here's what you need to know:

What is gerrymandering?

Gerrymandering refers to the practice of drawing political districts that give one party a lopsided advantage over the other in an election.

Boundaries for state and federal districts are redrawn every 10 years following the federal census to ensure each district contains roughly the same number of people. Usually, the party in power is the one in control of the redistricting — meaning both Republicans and Democrats have benefited from gerrymandering.

Legislators use two main strategies to gerrymander districts: packing and cracking.

Packing sweeps members of a particular group into one district, so as to allow the other party to win the leftover districts. Cracking does the opposite — it splits a single group across multiple districts, diminishing its voting power.

Another concept, which is at the heart of the case the Supreme Court heard in October, is known as the "efficiency gap." It measures roughly how many votes are determined to be "wasted" — meaning they don't contribute to an election win — as a result of the gerrymandering.

Benisek v. Lamone

Republican voters brought forward the Maryland case. They sued the state after its Democratic lawmakers redrew one of its federal congressional districts in 2011 to remove areas that leaned Republican and add areas that leaned Democratic.

In this case, the plaintiffs argued that the Democrats packed and cracked the state's Sixth District in retaliation for supporting Republican candidates.

The result, the plaintiffs said, was that a Republican candidate who won re-election in 2010 with a 28% margin lost in 2012 by a 21% margin — a major swing in the opposite direction.

The plaintiffs alleged that these tactics violated Republican voters' First Amendment rights because the Democrats "disrupted and depressed Republican political engagement in the area, and manifestly diminished their opportunity for political success."

Gill v. Whitford

The case the justices heard last October concerned a Wisconsin electoral map that the state's Republican-controlled legislature drew after the 2010 census.

That map allowed Republicans to win a whopping 60 of the State Assembly's 99 seats, despite Republican candidates winning just 48.6% of Wisconsin votes statewide. Democratic voters argued that this outcome clearly demonstrated an efficiency gap that disadvantaged the Democratic party.

A three-judge Federal District Court panel sided with Democratic voters after they sued, ruling that the Republican-drawn map unconstitutionally slanted the election in favor of Republicans.

But Wisconsin officials appealed the ruling, arguing that Democratic voters had effectively gerrymandered themselves by packing into cities, whereas Republicans were more evenly distributed throughout the state.

Although the lower court had ordered Wisconsin officials to draw up a new redistricting plan by the fall, the Supreme Court put a hold on that order.

Where do the justices stand on the issue?

Both of the gerrymandering cases before the Supreme Court are widely expected to come down to Justice Kennedy, with the remaining eight justices evenly divided along conservative-liberal lines.

The liberal justices in the past have been inclined to weigh in the constitutionality of extreme partisan gerrymandering, while the conservative ones believe they should avoid interfering in what they view as political disputes.

During opening arguments for the Gill v. Whitford in October, Kennedy appeared skeptical when asking questions of Wisconsin's lawyers, and asked no questions of the lawyer representing Democratic voters, according to media reports.

Some of the more liberal justices also questioned whether allowing Wisconsin's gerrymandering practice to continue would undermine the democratic process itself.

"I would like to ask you what's really behind all of this," Justice Ruth Bader Ginsburg asked. "The precious right to vote, if you can stack a legislature in this way, what incentive is there for a voter to exercise his vote? Whether it's a Democratic district or a Republican district, the result — using this map, the result is preordained in most of the districts."

But Ginsburg took a slightly different tone during Wednesday's arguments, The New York Times reported. She, and several other justices, argued that the Maryland case presented multiple logistical hurdles, and that a decision wouldn't be made quickly enough to affect the upcoming 2018 midterm elections.

The justices are expected to issue rulings on both the Maryland and Wisconsin cases in June.