Republican Pennsylvania Sen. Pat Toomey, locked in a difficult election battle with Democratic challenger Katie McGinty, announced in an opinion column Tuesday that he would oppose the Trans-Pacific Partnership, a 12-nation trade deal negotiated by the Obama administration that Congress is expected to take up after the fall election.

It is the latest blow to prospects for the deal's passage, since President Obama is counting on Republican support to overcome Democratic opposition to the deal.

Toomey, who earlier had been on the fence regarding the deal, said in a column for the Pittsburgh Post-Gazette that he had determined that it "falls short in several areas."

"We should not pass a flawed deal just to get a deal done. We should dump the TPP and return to the negotiating table to get an agreement that would create jobs and economic growth here at home," he said. Toomey cited in particular the deal's impact on the pharmaceutical industry, arguing it would make it too easy for foreign countries to steal drug patents, and its impact on Pennsylvania's dairy industry.

"This sector depends heavily on exports, which means it's critically important that trade agreements open foreign markets to our goods. Unfortunately, TPP has failed to do this meaningfully, particularly with respect to the protectionist Canadian market," he said.

Republicans historically have supported free-trade deals, arguing that they benefit everyone by expanding the economy overall, while Democrats have been more skeptical. Democratic presidential nominee Hillary Clinton is running against the deal despite having helped to negotiate it as Obama's secretary of state.

This election cycle, however, the skepticism has extended to Republicans. GOP presidential nominee Donald Trump opposes the deal. Several key lawmakers such as Senate Finance Committee Chairman Orrin Hatch, of Utah, also have voiced strong doubts. Sen. Majority Leader Mitch McConnell, R-Ky., postponed any vote until after the fall election, saying the matter was too hot to touch before then.

Toomey, who is seeking his second Senate term, has been narrowly trailing McGinty in most polls. A recent Quinnipiac poll, for example, puts the Democratic challenger ahead, 47-44 percent.

McGinty has hammered Toomey on the trade issue, telling voters in the traditionally blue-collar, Rust Belt state that the incumbent was not standing up for them.

"It's not every day that we see someone who's more out of touch on an important issue than Donald Trump, but today, Pat Toomey topped him. Donald made it clear that he's not with Pat Toomey on bad trade deals or defending China at the expense of Pennsylvania workers," she said in a June press release.