WASHINGTON — Of the many Republicans who took a political blow from Pennsylvania's new congressional map, Chester County's Ryan Costello got hit the hardest.

The second-term congressman saw his already-tough swing district move from having a Republican-leaning constituency to a narrowly Democratic one, according to independent analysts.

Half of his old Sixth District was replaced by new territory where he might be a less familiar name. More of moderate Chester County was added, while more rural and conservative pieces of his district were excised. The Democrat-heavy city of Reading was tied in. And his highly touted Democratic challenger, Chrissy Houlahan, was left inside the new Sixth District's boundaries.

It all arrives in a year shaping up as a potentially strong one for Democrats.

"If you look at the context of this year and these candidates, this turns what was a bad dream for Ryan Costello into a nightmare," said J.J. Balaban, a Democratic consultant based in Philadelphia.

On Tuesday, two political handicappers — Dave Wasserman of the Cook Political Report and Kyle Kondik of Sabato's Crystal Ball — both moved the district from a "lean Republican" rating to "toss up."

"Chrissy Houlahan probably couldn't have asked for a better map," Wasserman said. Costello is "probably the incumbent most negatively affected by the new map, I think that's fair to say."

Representing the kind of moderate, suburban district where President Trump has proved unpopular, Costello, 41, who lives right outside West Chester, was already facing the most difficult race of any GOP incumbent in Pennsylvania. But he had a district that leaned right — until the state Supreme Court ruled that it was part of a map unfairly skewed toward Republicans and drew new districts it believes are more logical and compact.

Other districts swung further in terms of partisan balance, but in those places Republican incumbents are either not running for reelection or are still favored.

Democrats suggested Costello might be better off running in the new Ninth District, which includes part of his existing district, has no incumbent, and is strongly Republican.

Costello didn't answer directly when asked about that possibility Tuesday — "I haven't done any political evaluation," he said. Instead, the normally mild-mannered congressman lashed out at the state Supreme Court and said he would support impeaching the justices who imposed the map. The court is controlled by Democratic justices.

"They knew they had to rig it against me," Costello said, calling the map "1,000 percent partisan" intended to "disguise" a Democratic gerrymander.

"This isn't democracy, this is political corruption," he said, predicting that a federal court would block the new map's implementation.

Democrat Hillary Clinton won his old district by less than one percentage point. Under the new map, she would have won the newly configured district by nearly 10.

The previous, GOP-drawn map was one factor aiding Republicans as they held a firm grip on every competitive seat in the moderate Philadelphia suburbs.

Despite the change,  most Democrats and Republicans said that the new Sixth District is no sure thing for Houlahan and that a strong GOP incumbent who created an independent identity could still win.

Sen. Pat Toomey (R., Pa.), for example, would have just barely carried the new district based on 2016 results, when he won reelection.

"A more suburban Republican" is "still viable," said Josh Novotney, a Republican consultant from Philadelphia.

Despite having significant new territory, he noted, Costello might be familiar to the new pieces of Chester County in the district, since he served two terms as a county commissioner.

Houlahan, a businesswoman who has never run for public office, now also has to introduce herself and campaign in areas that, days ago, were not part of the district. She said that the fractured nature of the old maps — which sliced Chester County into three districts — meant that she was already traveling outside the district to attend local Democratic events.

"The state itself is fair and drawn correctly," in the new map, Houlahan said in an interview. "As a result, the district is too."