The 18-year-old son of an Alabama sheriff's deputy was charged with murder in the shooting death of a sheriff in a neighboring county, authorities said Monday.

John Williams Sr. was killed Saturday night at a gas station in Hayneville, about 25 miles southwest of Montgomery, said Sgt. Steve Jarrett of the Alabama Law Enforcement Agency, the state police department.

The suspect, William Chase Johnson, surrendered at the gas station after a four-hour manhunt. He was ordered to be held at an initial court appearance Monday morning.

Lowndes County Sheriff John Williams Sr. Lowndes County Sheriff's Office

Williams was on duty and responding to an incident at the QV gas station, which is across the street from several Lowndes County municipal buildings, when he was shot, Alabama Attorney General Steve Marshall said in a statement.

Investigators didn't immediately say why Williams responded to the gas station.

But police said Johnson fled from the gas station after the shooting occurred just after 8 p.m. and then reappeared at the scene at about midnight. Officers recovered a handgun from Johnson before taking him into custody.

William Chase Johnson is suspected in the fatal shooting of Lowndes County Sheriff John Williams in Haynesville, Ala. Elmore County Sheriff's Office via AP

"Details as to how he fled the scene and then reappeared at the scene, all that's going to be investigated," Jarrett said.

The Montgomery County Sheriff's Office told NBC affiliates WSFA of Montgomery and WVTM of Birmingham that Johnson was the son of one of its deputies.

Download the NBC News app for breaking news

Williams, known as "Big John," was elected sheriff of Lowndes County in south Alabama in 2010, after having served as chief deputy sheriff for a decade.

"If any of you knew Big John Williams, he was a wonderful man," Jarrett said. "If you ever met him, you'd never forget him."

Alabama Gov. Kay Ivey said on Twitter that Williams would be remembered as "a consummate professional and pillar of his community."

I’m saddened to hear about Sheriff Big John Williams, who was tragically killed this evening in the line of duty. Through his service to our country in the @USMC and his many years working in law enforcement, he dedicated his life to keeping other people safe. (1/2) #alpolitics — Governor Kay Ivey (@GovernorKayIvey) November 24, 2019

Dozens of people, including law enforcement officers in uniform who traveled from surrounding communities, turned out for a vigil on Sunday.

"He was always good to our children. They all loved him," Shirley McNamee, a Lowndes County resident, told WSFA.

"It's been really hard today," McNamee said. "There wasn't a dry eye at our church today."

Tyler Norris, the police chief in Citronelle, in Mobile County, said he had been friends with Williams for many years.

"Big John never met a stranger," Norris said in a statement.

"Big John had many white brothers and sisters as well as black," Norris said. "He truly believed they were his blood kin. He never saw color as a reason to treat anyone different or love anyone less.

"Big John was one of those you hear about in our profession that would work for free," he continued. "He would literally work for no pay at all, if he could have survived financially doing so."

Mobile County Sheriff Sam Cochran said in a statement that Williams was one of the "most well-liked and well-respected" members of the Alabama Sheriffs Association.

"He was known as 'Big John' not just because of his height, but because of his deep commanding voice and his very large command presence," Cochran said.

Williams was born and raised in Lowndes County and began serving with the Hayneville Police Department in 1984. Three years later, he began working full-time with the Lowndes County Sheriff's Office while still employed with the Hayneville police, according to his sheriff's department profile.

In 2000, Williams was the arresting officer of Jamil Abdullah Al-Amin, a 1960s black militant who was known as H. Rap Brown before he converted to Islam. Al-Amin was later convicted in the fatal 2000 shooting of a Fulton County sheriff's deputy in Atlanta.

Lowndes County, which had a population of around 11,000 in the 2010 census, is predominantly black.

In 2007, then-Gov. Bob Riley's appointment of a white officer to replace the county's deceased sheriff was met with protests after he ignored commissioners and other elected officials who had recommended Williams for the post. Williamswas then elected sheriff in 2010.