Democrat Josh King says he will run for Prince William County sheriff in 2019.

Democrats are having increasing success in once-conservative Prince William County — most recently on Nov. 6, when voters went heavily for incumbent Sen. Tim Kaine (Va.) over Republican Corey A. Stewart, chairman of the Board of County Supervisors, as part of a local Democratic sweep.

Now a Democrat has thrown his hat into the ring for a county sheriff’s race that is 12 months away, launching a contest that will further illuminate whether Virginia’s second-largest jurisdiction has turned blue.

Josh King — a Dumfries resident who ran twice for the House of Delegates in the past three years, including a loss in last year’s Democratic primary — announced on Saturday that he will challenge Prince William Sheriff Glendell Hill, a well-liked Republican who has mostly kept his head down during four terms.

King, a deputy sheriff in neighboring Fairfax County, is the first Democrat to seek the office in 15 years. He is casting the election as a referendum on President Trump.

That strategy helped Democrats take three U.S. House seats in Virginia last week — including the 10th Congressional District that cuts through Prince William, where state Sen. Jennifer T. Wexton beat Republican Rep. Barbara Comstock.

But it may not work in a run against Hill, a moderate who last year rescinded his endorsement of Stewart in the Republican gubernatorial primary because of Stewart’s efforts to preserve Confederate monuments in Virginia.

Prince William County Sheriff Glendell Hill is a Republican.

Hill, who was elected sheriff in 2003, said partisan politics don’t play well with Prince William voters in most local races.

If King tries to link him to Trump or Stewart, Hill said, “he’s already made his first mistake.”

As sheriff, “your responsibility is to serve the citizens of Prince William County and the citizens of Manassas and Manassas Park,” Hill added. “Not your party. The citizens.”

King said he will argue that Hill is not equipped to deal with the impact of Trump’s divisive rhetoric on local communities, where the federal crackdown on undocumented residents has left many immigrants afraid of interacting with law enforcement, and there is growing concern about recent mass shootings fueled by hate against specific groups.

“It needs to stop,” said King, who says that, among other things, he would end the decade-old federal 287(g) agreement between the Prince William County Sheriff’s Department and Immigration and Customs Enforcement, through which undocumented immigrants in local custody are more easily handed over for deportation.

“We should be working together and moving forward, not backwards,” King said.

Prince William, whose 463,000 residents include a growing number of immigrant families and young professionals commuting to Washington, is in a sort of political flux.

The county was at the center of the 2017 blue wave that leveled the balance of power in Virginia’s General Assembly, sending five new Democrats to the House of Delegates, including Danica A. Roem, the nation’s first openly transgender state lawmaker.

The county also chose Gov. Ralph Northam (D) by 23 points last year and, in 2016, favored Hillary Clinton over Trump by 21 points.

But at the local level, the county is still solidly Republican, with only two Democrats on the eight-member Board of County Supervisors. Three of the eight school board members are affiliated with the GOP. An incumbent backed by the local Democratic Party was reelected chair of the school board last week, over a GOP-backed board member, in a contest marred by allegations of dirty tricks.

But it is unclear whether such partisan politics will affect Hill.

He has worked well with Stewart and his Republican colleagues, agreeing in 2008 to have his department cooperate with ICE as part of a broader county effort to curb illegal immigration.

At the same time, Hill has not been afraid to take a stand against Stewart.

Last year, he called “all that Confederate stuff” that was central to Stewart’s gubernatorial campaign too divisive and, after taking back his endorsement, supported Ed Gillespie in the GOP primary.

This year, Hill has been overseeing a $45.6 million expansion of the county’s crowded jail, which will add 204 prisoner beds.

Supervisor Frank J. Principi (D-Woodbridge), who is backing King, said Hill’s nonconfrontational style and relative popularity as an incumbent means that “it will take quite a lot to overtake him.”

King said he thinks that Hill is part of an “old guard” of Republicans in Prince William that is now out of touch.

“They call it a wave. I call it a hurricane,” he said of the recent tide of Democratic wins in Prince William. “We’re going to come in and take it all.”

Stewart is inclined to agree. He’s still undecided about whether he’ll seek reelection next year. He would face a fight for the party nomination from Supervisor Martin E. Nohe (R-Coles).

At this point, he’s leaning against it, Stewart said, citing in part the strong get-out-the-vote apparatus created by Democrats in Prince William.

“It’s going to be very difficult for any Republican to overcome, frankly,” Stewart said. He predicted that Hill could be “vulnerable simply because he has an ‘R’ after his name.”