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.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.