A person familiar with President Trump's political operation said Wednesday that Republican losses in a pair of governor's races this week are the products of "local dynamics" and "history," and not a rebuke of the administration's agenda.

"These are blue states that the president did not win last year," the source said of New Jersey and Virginia, where both GOP gubernatorial candidates lost by definitive margins in their off-year contests on Tuesday. "This is not about the president."

Ed Gillespie, the Republican candidate for governor in Virginia, and Kim Guadagno, the Republican candidate for governor in New Jersey, both suffered heavy defeats.

Democrat Ralph Northam surged to victory with 53.9 percent of the vote Tuesday night, outperforming Hillary Clinton in nearly every part of the Commonwealth, which she carried by a 5-point margin in last year's presidential election.

But in southwest Virginia, a conservative area where Gillespie spent significant time courting white-working class voters and campaigning with high-profile figures like Vice President Pence, the former Republican National Committee chairman outperformed previous GOP candidates.

White House officials believe Gillespie succeeded in that area because it was there that he openly embraced Trump, even hiring the president's former field director for southwest Virginia to serve on his gubernatorial campaign.

"The president was able to boost Ed Gillespie's numbers to plus-51 percent in southwest Virginia, a place where the president's support of the candidate and vice versa was fully publicized," said the source involved in Trump's political operation.

Many analysts have viewed Tuesday's losses as signs the GOP's broader electoral fortunes could be dimming ahead of the midterm elections next year.

"We have regular meetings as a team" where the political landscape and strategies for engaging in races are discussed, the source told reporters at the White House. Trump ultimately decides which races to weigh in on, and which to avoid.

"The president is actively engaged" in activities such as contacting political committees, the source added.

They acknowledged that "inaction" by congressional Republicans likely played a role in Tuesday's electoral results, noting GOP incumbents facing tough re-election races are likely to find themselves in greater jeopardy if they lack a major legislative victory to tout next year.

"History tells us that midterm elections are competitive for a president's party and I don't disagree with that," the source said. "Not passing tax reform would make it even more competitive."