Prince William County plans to formally name a popular top-ranking police major as its police chief late Tuesday, a county official involved in the closed-door discussions told the Washington Post, ending a more than six-month process to find a replacement for one of the most respected police leaders in the country.

The Board of County Supervisors plans to announce the appointment of Major Steve Hudson late Tuesday, according to the county official, who asked not to be named because the decision has not yet been publicly announced.

Hudson, 53, joined Prince William’s force in 1982 and early in his career earned the admiration of the force’s rank and file for how he handled a situation where he encountered a friend’s son holding a gun and shot and killed him.

The shooting death of Jimmy Lloyd was featured in a February 2012 Washington Post story about how police officers deal with the aftermath of killing someone in the line of duty. People familiar with the department say that 1996 incident and the professionalism with which he handled it helped propel Hudson up the ranks.

“I was angry at him for forcing my hand,” Hudson said in the story. “I didn’t feel bad about the decision, because I knew it was the right thing to do.”

Board members considered four candidates, people familiar with the search say, including Hudson and current Acting Chief Barry S. Barnard. The others were two external candidates, whose names were not released.

Hudson will replace retired Chief Charlie Deane, who served in Prince William for more than four decades and worked closely with him.

Deane was admired for his ability to work across multiple agencies — including with surrounding counties and the FBI, among others — and in managing some of the region’s most bizarre and difficult crimes, including the Washington area sniper shooting and tracking the so-called East Coast Rapist.

Deane is perhaps best known for his handling of the county’s 2007 anti-illegal immigration measure that required county police to ask about immigration status for anyone arrested. That policy continues and Board Chairman Corey A. Stewart (R-At Large) said at the beginning of the police chief search that a prerequisite qualification would have to be someone who agreed with it.

While Barnard was a “very, very close second,” the county official familiar with the decision said, board members ultimately decided that Hudson’s balance of administrative and operational experience put him slightly ahead of Barnard, whose experience is primarily administrative.

Hudson has handled administrative duties in his current role as an assistant chief overseeing the department’s Criminal Investigations Division and in other roles.

Hudson’s stature within the department also helped his case.

Barnard, however, was the early leader among senior county management, where he gained credibility for leading the implementation of a complex new county-wide radio system. He had also earned plaudits for his delicate touch when Officer Chris Yung, 35, was killed on duty in recent months.

An earlier version of this story incorrectly reported the day that the police chief announcement will be made. The story has been corrected and updated from the original post.