In a blow to Republican presidential candidate Donald Trump, a U.S. judge on Thursday upheld a Pennsylvania state law that could make it difficult for his supporters to monitor Election Day activity in Democratic-leaning areas.

Trump has repeatedly said that the Nov. 8 presidential election may be rigged, and has urged supporters to keep an eye out for signs of voting fraud in Philadelphia and other heavily Democratic areas.

Democrats worry that could encourage Trump supporters to harass Hispanics, African-Americans and other minority voters in a state that could determine whether Trump or his Democratic opponent, Hillary Clinton, wins the presidency.

Trump faces a significant hurdle in Pennsylvania because state law requires partisan poll watchers to perform their duties in the county in which they are registered to vote.

That could make it difficult to recruit monitors in places like Philadelphia, where Democrats outnumber Republicans by a ratio of 8 to 1. The city has 120,000 registered Republicans and 1,685 voting locations.

The Pennsylvania Republican Party sought to suspend that requirement so that poll monitors could come from anywhere in the state, which would enable them to bring in supporters from suburban and rural areas where Trump has stronger support.

But U.S. District Judge Gerald Pappert denied the request, writing that it would be too disruptive to change the law less than a week before Tuesday's vote.

"Were the Court to enter the requested injunction, poll watchers would be allowed to roam the Commonwealth on election day for the first time in the Election Code's seventy-nine year history — giving the Commonwealth and county election officials all of five days' notice to prepare for the change," he wrote.

The Republican Party of Pennsylvania did not immediately respond to a request for comment.