Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — There are only about 30,000 people in Iowa’s 82nd state House district, near Ottumwa, but Democrats are hailing a victory in a special election there Tuesday as another early indicator of a backlash against President Donald Trump that could fuel big wins in next year’s midterms.

The southeast Iowa district has been trending away from Democrats, voting for former President Barack Obama twice before breaking heavily for Trump last year, just like the entire state of Iowa. But Democrat Phil Miller, a veterinarian, carried the district with 54 percent of the vote Tuesday in a race to replace a Democrat who died in office.

“Tonight’s victory in a district Trump won by 21 points just last fall is a testament to Democrats’ strength in deep red districts, and with Representative-elect Miller in the Iowa House we’re one step closer to regaining the chamber,” said Jessica Post, the executive director of the Democratic Legislative Campaign Committee, the official legislative campaign arm for Democrats.

Related: Democrats Ready to War With Trump on Trade

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Iowa's political mood is always watched closely, given the state's crucial role in the presidential primary process by holding the first-in-the-nation caucuses.

While Democrats have lost this year’s higher-profile congressional special elections, like the one in Georgia's 6th Congressional District, they’ve had more success in state legislative races.

And party officials say what matters most in predicting future outcomes is not necessarily whether they win or lose, but the margins between the candidates and whether those suggest any kind of pattern.

In all types of races, whether winning or losing, Democrats have consistently over-performed their party's performance in earlier presidential elections by an average of 14 percentage points, according to a June analysis by FiveThirtyEight.

“Democrats have not only wrested four seats from Republicans, but they’ve also outperformed Democratic presidential numbers from just last fall in 24 out of 31 contested congressional and state legislative elections,” wrote Carolyn Fiddler, a former DLCC official who is now an editor at the liberal Daily Kos blog.

Democrats recently won their first New Hampshire state Senate special election since 1984, and took a pair of conservative districts in Oklahoma, along with another one on Long Island, New York. They maintained control of the Delaware state Senate with a win there, and cheered other wins in Connecticut and Pennsylvania.

Republicans have won nearly as many legislative special elections since Trump’s inauguration, but most were in safer seats.

Democrats have been decimated in state legislatures, losing around 1,000 seats during Obama’s eight years in the White House. Republicans now have complete control of the capitol (the governorship plus both chambers of the legislature) in 26 states, versus just six for Democrats.

Democrats hope to chip away at that in upcoming state elections in Washington, New Jersey and Virginia this fall.