The Pennsylvania State Capitol Building, in downtown Harrisburg, Pennsylvania.

The midterm elections to Congress were widely seen as a referendum on President Donald Trump, but in Pennsylvania state Senate races, another factor may have been crucial: the high-profile grand jury report outlining decades of sex abuse within the Catholic Church.

On Tuesday, at least five seats of 50 in the upper house flipped from Republican to Democratic (25 seats were on the ballot in the election). Many of those red-to-blue districts were located in the Philadelphia suburbs. Although the Democratic gains were not enough to take control of the Senate, it was enough to break the Republicans’ veto-proof majority.

According to Pennsylvania political observers, losses handed to long-time incumbent Sen. John Rafferty, R-Montgomery, and Stewart Greenleaf Jr., who was seeking to fill the seat that his father, Sen. Stewart Greenleaf Sr., R-Montgomery, held for nearly 40 years, were particularly surprising. Rafferty had been in line to become chairman of the Senate Judiciary Committee with the retirement of Greenleaf Sr. Both Rafferty and Greenleaf Jr. are attorneys.

Feelings about Trump—positive and negative—led to extremely high turnout for a midterm election. Particularly, anti-Trump sentiment in the Philadelphia suburbs fueled the gains made in districts that span Montgomery, Chester, Bucks and Delaware counties, politicos said.

However, observers also pointed to the high-profile grand jury report uncovering the widespread sex abuse in Pennsylvania and the unsuccessful legislative efforts to pass a bill expanding liability against the church as likely factoring into the vote. The bill, which would have provided for a window in the statute of limitations to allow victims with older claims to bring suits, had passed the state House of Representatives, but it ultimately failed in the Republican-controlled Senate.

In the weeks before the election, Democrats placed in high rotation an ad focusing on the failure to pass the bill, saying, “If Senate Republicans won’t stand with victims, how can we expect them to stand with us,” before telling viewers to “vote Democratic.”

The ad included photos and names of several republican senators, including Rafferty, Greenleaf Sr., Sen. Tom McGarrigle, who lost his seat representing portions of Chester and Delaware counties, and Sen. Tommy Tomlinson, R-Bucks. As of Wednesday, Tomlinson appeared to have a narrow lead over challenger Tina Davis, but Davis had not yet conceded.

“I thought that was a very powerful ad that crossed party lines, whether it was the primary driver, or whether that was just the icing on the cake,” political observer Larry Ceisler, principal of Ceisler Issue & Media Advocacy, said.

Political analyst G. Terry Madonna, director of the Center for Politics and Public Affairs at Franklin & Marshall College, said the issue was likely a factor as well.

“I’m not discounting it,” he said.

However, pointing to wide margins for Democratic wins in the statewide races and massive turnout that he said Pennsylvania hasn’t seen during a midterm cycle for decades, Madonna said Trump appeared to be the biggest driving force.

“I’m not saying [the sex abuse bill was] not important, but I don’t think that was the big motivator,” he said, adding that it appears that younger and college-educated women appeared to have switched allegiances to the Democratic ticket during the midterms. “There’s a particular demographic and ideological point of view that makes it very difficult for Republicans these days.”

Jason Gottesman, a spokesman for the state Republican Party, said the ad was very misleading, since none of the senators featured had voted on the bill, and some, including Rafferty, said they would have supported a bill with a window allowing victims with older claims to sue.

“We really believe that in a lot of these areas where there were Republican losses, voters went against their own interests in who they sent to Harrisburg,” he said. “There is going to be significant buyers remorse.”

Gottesman said that, although Senate Republicans hold a smaller majority, they will be a united “bulwark” against Gov. Tom Wolf and newly elected Lt. Gov. John Fetterman.

Many of those who lost seats Tuesday were widely seen as moderate Republicans, and Madonna said that, with fewer moderates, the party is likely to become more conservative and Pennsylvanians can likely expect to see less compromise between the parties.

Regarding the Republicans’ loss of their veto-proof majority, Madonna also noted that it wasn’t something the senators typically used.

“It’s nice sounding, but it hasn’t had any practical significance,” he said.

Along with signaling to Pennsylvanians what they are likely to see in the coming years from the state government, the vote Tuesday may have also signaled to legislators what issues are on the minds on Pennsylvanians.

Since the release of the nearly 900-page grand jury report in August, state Attorney General Josh Shapiro, who led the grand jury investigation that resulted in the report detailing 70 years of abuse, has been pushing for a law that would allow victims to sue despite have claims beyond the statute of limitations.

Ceisler said the losses Tuesday might give Sharpiro and legislators a clear idea of where voters stand on the issue.

“I think it’s a real strong message to [Senate Pro Tem] Joe Scarnati [R-Jefferson], and I think it is a real powerful message for Josh Shapiro to use as he works to get this legislation passed,” Ceisler said.