Donald Trump holds a campaign event in Eau Claire, Wisconsin U.S. November 1, 2016. REUTERS/Carlo Allegri Donald Trump won the key battleground state of Pennsylvania on Tuesday, a huge upset over Hillary Clinton, according to the Associated Press.

Since August, Clinton appeared to run slightly ahead of the Republican presidential nominee.

The Real Clear Politics average of recent polls showed Clinton with a 1.9-point lead over Trump early on Tuesday, while FiveThirtyEight puts her odds of winning in the state at 77%.

Clinton campaigned hard in Pennsylvania, making numerous stops in the state over the past months, and dispatching high-profile surrogates like President Barack Obama, first lady Michelle Obama, Vice President Joe Biden, and Sen. Bernie Sanders to the state in recent weeks.

The former secretary of state joined her husband former President Bill Clinton, both Obamas, Bruce Springsteen, and Jon Bon Jovi for a final campaign rally in Philadelphia on Monday night.

For his part, Trump focused significant energy on Pennsylvania, attempting to woo voters in the rural and suburban middle parts of the sate.

Though the Republican presidential nominee's campaign cancelled ads in some Pennsylvania markets last month, Trump repeatedly claimed without basis that the only way he would lose the state is "if cheating goes on."

A Clinton win could have buoyed the fortunes of other Democratic candidates down-ballot. Strong Democratic turnout could have helped boost Democratic senate nominee Katie McGinty, who lost to Sen. Pat Toomey in Pennsylvania late Tuesday.

This post will be updated....