HARRISBURG, Pa. (Reuters) - Pennsylvania Supreme Court justices on Wednesday grilled a lawyer who defended the way state congressional districts are apportioned, a design opponents have challenged as illegally skewed to benefit Republicans who hold 13 of its 18 seats in the U.S. House of Representatives.

The majority of the court, which has five Democrats and two Republicans, appeared sympathetic to the argument that Pennsylvania’s congressional districts are illegally gerrymandered. A civic group and some Democratic voters brought the challenge, one of several such lawsuits nationwide.

If the court ordered lawmakers to draw a new map, it could help Democrats in the 2018 midterm elections. The party needs to flip two dozen seats nationwide to win control of the House, and Pennsylvania is a key battleground.

Jason Torchinsky, a lawyer representing Republican legislative leaders, endured tough questions from the justices over his contention that lawmakers can legally draw the map to protect partisan interests.

Justice Max Baer, a Democrat, questioned Torchinsky’s claim that district maps can connect disparate neighborhoods using “land bridges,” sometimes no wider than a single property.

“So if you took the Democratic areas of Pittsburgh and Philadelphia and connected them via the Pennsylvania Turnpike, that’s okay?” he asked.

Torchinsky replied yes.

During the 2-1/2-hour hearing, several justices expressed uncertainty about whether the map could be redrawn in time for fall elections, with some candidates already on the campaign trail.

“We could agree with your argument and still deny a remedy that puts the state into a tailspin,” said Justice Debra Todd, a Democrat.

The League of Women Voters of Pennsylvania filed the lawsuit challenging a 2011 redistricting by the Republican-led Pennsylvania legislature. The suit claims the legislature violated the state constitution by contorting the map to favor Republicans with some of the most gerrymandered districts in the country.

“We’re not doing it to equalize population or make the districts more compact or contiguous,” David Gersch, a lawyer for the plaintiffs, said of Republican legislators. “We’re doing it because we don’t like the way you vote.”

Similar challenges nationwide include a case involving Wisconsin currently before the U.S. Supreme Court, which has previously suggested extreme partisan gerrymandering may be unconstitutional.

Still, the U.S. high court has never articulated a specific standard, a point some of the Pennsylvania justices noted.

“You are asking us to go further than any court has gone before,” Todd said.

A lawyer for Democratic Governor Tom Wolf told the court the governor supports a new map for 2018 and that primary elections in May could be postponed if needed.

(This version of the story corrects spelling of Pennsylvania’s in paragraph two)