KENTUCKY-Democrats took full control of the Virginia legislature for the first time in more than two decades while the race for governor in deeply Republican Kentucky was too close to call despite a last-minute boost from President Donald Trump.

In Kentucky, Democratic challenger Andy Beshear held a narrow lead and declared victory in the governor’s race over Republican incumbent Matt Bevin on Tuesday, though Bevin had not conceded.

And in Virginia, Democrats flipped control of the state Senate and House, gaining outright control of state government in a state that is often a battleground for the White House.

“I’m here to officially declare today, Nov. 5, 2019, that Virginia is officially blue,” Democratic Gov. Ralph Northam told a crowd of supporters in Richmond.

A year before the presidential election, the results offered warning signs for both parties. Voters in suburban swaths of Kentucky and Virginia sided with Democrats, a trend that would complicate Trump’s path to reelection if it holds. And the Democrats who made gains on Tuesday did so by largely avoiding positions such as “Medicare for All” that have animated the party’s left flank in the Democratic presidential primary.

Democratic pickups in Virginia occurred in Washington, D.C., and Richmond suburbs that already had trended in the party’s direction in recent years. In Kentucky, Beshear gained considerable ground on Bevin in Kentucky’s suburban Cincinnati, Ohio, counties that had helped propel the Republican to office four years ago. Other statewide GOP candidates in Kentucky won by comfortable margins.

But the dip at the top of the ticket still offered another example in the Trump era of suburban voters’ willingness to abandon established Republican loyalties — even with the president making a personal appeal on behalf of a GOP standard-bearer.

Trump’s 2020 campaign manager tried to find a positive frame for the results in a state Trump won by 30 percentage points in 2016.

“The president just about dragged Gov. Matt Bevin across the finish line, helping him run stronger than expected in what turned into a very close race at the end,” Brad Parscale said.

Trump may depend on Mississippi, where he also campaigned in the final stretch before Election Day, for something to crow about. With Republican Gov. Phil Bryant term-limited, GOP nominee Tate Reeves defeated Democrat Jim Hood to extend the GOP’s 20-year hold on the state’s top office. But even that contest could finish with a single-digit margin in a state Trump won by 28 percentage points three years ago.

The tighter result for Reeves reflected the same suburban trends seen in other states. Heavily Republican counties outside Jackson, Mississippi, and Memphis, Tennessee, still tilted to the GOP nominee but by noticeably narrower margins than what Bryant had four years ago to win a second term.

Legislative seats also were on the ballot in New Jersey, with Democrats positioned to maintain their overwhelming majorities and quell any opportunity for Trump to suggest that the Republicans were encroaching on Democratic territory ahead of 2020.