A photo provided by the Elmore County Ala. Sheriff's Office shows William Chase Johnson, a suspect in the fatal shooting of Lowndes County Sheriff John Williams Saturday night, Nov. 23, 2019 in Haynesville, Ala. (Elmore County Ala. Sheriff's Office/Montgomery Advertiser via AP)

HAYNEVILLE, Ala. (AP) — Law enforcement agencies in Alabama and beyond posted messages of condolences on social media Sunday in the aftermath of the fatal weekend shooting of a sheriff in the state.

Few details were immediately available about the circumstances surrounding Saturday evening’s shooting and the capture of an 18-year-old suspect hours later.

Gov. Kay Ivey tweeted that Lowndes County Sheriff John Williams had been “tragically killed” in the line of duty and that she offered her prayers and sympathy to his family and the county sheriff’s department. Williams is the fifth Alabama law enforcement officer to die from gunfire in the line of duty, and the sixth overall, in 2019, according to a statement from state Attorney General Steve Marshall.

The suspect in custody was identified as 18-year-old William Chase Johnson. Montgomery County Sheriff Derrick Cunningham initially told news outlets that Williams was shot at a gas station.

It was unclear what, if any, role race played in the shooting. The sheriff was African American.

Meanwhile Sunday, amid messages of condolence from law enforcement agencies, members of the public responded with prayers and well wishes for the sheriff’s family.

The state had issued an emergency alert late Saturday saying it was seeking an 18-year-old white man last seen around the time of the evening shooting at a QV gas station in the Lowndes County seat of Hayneville, about 20 miles (32 kilometers) southwest of the capital city of Montgomery.

Sgt. Steve Jarrett, the commander of state troopers’ Montgomery post, later confirmed to reporters that the shooting took place at the QV station, and that Johnson was the only suspect at the time. An emailed message announcing the alert said the man they were seeking was considered a “serious risk” and possibly was traveling on foot.

Jarrett confirmed to news outlets that Johnson subsequently approached the shooting scene just after midnight and that he had a handgun with him. The state law enforcement agency canceled the emergency alert early Sunday, saying Johnson was taken into custody.

“Details as to how he fled the scene and then reappeared at the scene, all that’s going to be investigated,” Jarrett said, according to WSFA-TV.

The tall sheriff was known as “Big John.” Gov. Ivey paid tribute to him online, writing that in the sheriff’s years of service in the U.S. Marine Corps and “his many years working in law enforcement, he dedicated his life to keeping other people safe.”

Williams was first elected sheriff in 2010, running as a Democrat. He was a Lowndes County native who had begun volunteering as a reserve deputy in 1978. He also worked for Hayneville police before joining the sheriff’s department full-time in 1987 and being appointed chief deputy in 1990.

“Sheriff Williams always wanted to make a difference in his community and felt there was no better way to help his community than to protect and serve them in law enforcement,” the biography read.

Lowndes County is predominantly black. It had a population of around 11,000 in the 2010 census. In 2007, more than 60 people gathered at the county courthouse to protest then-Gov. Bob Riley’s appointment of a white law enforcement officer to replace the county’s deceased sheriff. At the time, the county commission president said all five commissioners and other elected officials had recommended Williams for the position.

During his decades with the sheriff’s office, Williams notably in 2000 was the arresting officer of Jamil Abdullah Al-Amin, a 1960s black militant who was known as H. Rap Brown before converting to Islam. Al-Amin was wanted and later convicted in the fatal 2000 shooting of a Fulton County sheriff’s deputy in Atlanta.

In this March 21, 2000 photo, Lowndes County Sheriff Willie Vaughner, left, and chief deputy John Williams stand at the intersection where Williams apprehended Jamil Abdullah Al-Amin on Monday evening in White Hall, Ala. Williams was fatally shot in the line of duty Saturday evening, Nov. 23, 2019, in a county near the state capital city, Alabama Gov. Kay Ivey said. Ivey tweeted that Lowndes County Sheriff Williams was “a pillar of the community.”  (Al Benn/Montgomery Advertiser via AP)
The suspect, with the dark and white backwards ball cap, center rear, accused of shooting Lowndes County Sheriff John Williams is surrounded by law enforcement as he walks back to the scene with a firearm, early Sunday, Nov. 24, 2019, in Hayneville, Ala. The suspect was identified as 18-year-old William Chase Johnson. (Kirsten Fiscus/Montgomery Advertiser via AP)
Lowndes County Sheriff John Williams was shot and killed in the line of duty at a convenience store in Hayneville, Ala., on Saturday, Nov. 23, 2019.  (Kirsten Fiscus/Montgomery Advertiser via AP)
In this July 20, 2007 photo, Lowndes County Chief Deputy John Williams speaks during the memorial service for Lowndes County Sheriff Willie Vaughner at the Lowndes County Courthouse in Hayneville, Ala. Alabama Gov. Kay Ivey says Lowndes County Sheriff Williams has been fatally shot in the line of duty. Ivey said Williams was
Deputies, police, and state law enforcement work the scene of a QV gas station in Hayneville, Ala., where Lowndes County Sheriff John Williams was shot and killed, Saturday, Nov. 23, 2019. The suspect taken into custody was identified as 18-year-old William Chase Johnson. (Kirsten Fiscus/Montgomery Advertiser via AP)
Lowndes County Sheriff John Williams was shot and killed in the line of duty at a convenience store in Hayneville, Ala., on Saturday, Nov. 23, 2019. (Kirsten Fiscus/Montgomery Advertiser via AP)
The suspect, with the dark and white backwards ball cap, accused of shooting Lowndes County Sheriff John Williams is surrounded by law enforcement as he walks back to the scene with a firearm, early Sunday, Nov. 24, 2019, in Hayneville, Ala. The suspect was identified as 18-year-old William Chase Johnson. (Kirsten Fiscus/Montgomery Advertiser via AP)
Deputies, police, and state law enforcement work the scene of a QV gas station in Hayneville, Ala., where Lowndes County Sheriff John Williams was shot and killed, Saturday, Nov. 23, 2019. The suspect taken into custody was identified as 18-year-old William Chase Johnson. (Kirsten Fiscus/Montgomery Advertiser via AP)