Sen. Tim Kaine, left, and his Republican challenger Corey Stewart. (AP, Katherine Frey/The Washington Post/AP, Katherine Frey/The Washington Post)

With less than two months remaining before the Nov. 6 midterm elections, Sen. Tim Kaine (D) has a commanding lead in his reelection race against Republican Corey A. Stewart in Virginia.

A poll released Tuesday by the University of Mary Washington in Fredericksburg shows Kaine leading Stewart 49 percent to 30 percent among all respondents. Libertarian candidate Matt Waters received 5 percent.

Although 73 percent of Republican respondents said they’d vote for Stewart, 15 percent of Republicans favored Kaine — a reflection of the deep divisions among Virginia Republicans over Stewart, who models himself after President Trump and likes to say, “I was Trump before Trump was Trump.”

Among Democrats, 90 percent supported Kaine.

A third of those surveyed said their feelings toward Trump would be a major factor in how they vote.

“By September, successful candidates usually have their partisans locked down,” said Stephen J. Farnsworth, a political-science professor at the University of Mary Washington who directs the school’s Center for Leadership and Media Studies. “That so many Republicans favor Kaine at this point in the election is terrible news for Corey Stewart.”

But, Farnsworth cautioned, “any statewide election in ­‘purple’ Virginia is likely to tighten up as the contest draws nearer.”

The telephone survey of 801 respondents in early September mirrors earlier statewide polls showing Kaine far ahead of Stewart, whose Senate campaign has been marred by controversy about questionable ties to white supremacists.

In August, a Virginia Commonwealth University poll showed Kaine ahead by 23 points, while a Roanoke College poll showed the senator leading by 17 points.

A survey trumpeted by the Stewart campaign last month showed him trailing by just five points, but that telephone survey was limited to landlines, leaving out Virginia voters who use only mobile phones. It also used a methodology that produces more Republican-heavy samples.

In the University of Mary Washington poll, Stewart trailed Kaine badly in voter-heavy areas of the state.

In Northern Virginia, where Stewart is chairman of the Prince William Board of County Supervisors, Kaine led by 42 points. In the Tidewater region, Kaine was ahead by 22 points. Stewart performed best in the less-populated rural portions of western Virginia, where he led Kaine by 11 points.

Among voters surveyed, there was a modest gender gap. Women backed Kaine by 52 percent to 27 percent, while men favored Kaine 45 percent to 33 percent.

Immigration was ranked by 39 percent of Stewart supporters as the most important problem facing the country, while 18 percent said it was the economy and jobs. Meanwhile, 29 percent of Kaine supporters named health care as the most important issue,while 18 percent said it was the economy and jobs.

Stewart has recently made some changes to his campaign after running into a string of controversies that have included an Inauguration Day video in which he praised Paul Nehlen — a white supremacist who ran unsuccessfully for the open seat of House Speaker Paul D. Ryan (R-Wis.) — as his “personal hero.”

Last month, Stewart fired Noel Fritsch, his top campaign spokesman, who has helped craft a no-holds-barred campaign message that has included several inflammatory tweets.

One of those tweets, about a Democratic gubernatorial candidate in Michigan who is Muslim, crossed the line for Stewart.

In that post, Fritsch called Abdul Sayed “an ISIS commie” after he nearly won his party’s nomination in early August. “This guy wants to abolish ICE and won 300,000 votes. Dangerous stuff,” Fritsch tweeted, referring to U.S. Immigration and Customs Enforcement. “Don’t let wimpy @timkaine bring this dangerous stuff to VA.”

Meanwhile, a campaign consultant working for Stewart has been criticized for calling ­majority-black cities “s---holes” in social media posts and for bemoaning the South’s loss of the Civil War.

Correction: An earlier version of this story misstated the support among men for Kaine and Stewart.