The fatal shooting of an Alabama sheriff on Saturday set off a manhunt that ended with the arrest of an 18-year-old, authorities said.

William Chase Johnson was arrested just hours after a statewide manhunt was launched following Lowndes County Sheriff John Williams’s death at a QV gas station on Saturday shortly after 8 p.m. Johnson, who fled the scene, was considered a “serious risk” to the public, according to Alabama State Trooper Sgt. Steve Jarrett.

Johnson was taken into custody around midnight at the same gas station, Jarrett told reporters. A handgun was found at the scene, according to Jarrett.

Williams’s death has shaken Alabama. Gov. Kay Ivey (R) tweeted she was saddened by the former Marine’s killing.

“He will be remembered as a consummate professional and pillar of his community,” Ivey wrote of the sheriff, who was born and raised in Lowndes County. “I offer my prayers and deepest sympathies to his family and to the men and women of the Lowndes County Sheriff’s Department.”

Williams, who had more than 40 years of experience in public safety, had been responding to the gas station owner’s call to authorities for help to disperse a crowd that was hanging out in the parking lot, Al.com reported.

“Details as to how he fled the scene and reappeared at the scene, all that’s going to be investigated,” Jarrett said, referring to the suspect.

Williams was well known throughout the state, and probably in other states, as well, Jarrett said.

“This is major in the law enforcement community to lose Sheriff ‘Big John’ Williams,” he said, against a backdrop of other sheriffs who were in attendance to show their support.

State Attorney General Steve Marshall said Williams had served for decades to keep the public safe, with the last nine of those years serving the residents of Lowndes County.

“Serving the public in the role of a peace officer is a difficult calling, fraught with peril, yet thankfully many Alabama men and women choose to answer the call, often time putting their own lives in danger to protect us,” Marshall said in a statement.

Williams was elected by a majority as a Democratic sheriff in 2010. The predominantly African American Lowndes County has an estimated population of just under 10,000, according to census data and notably protested then-Gov. Bob Riley’s appointment in 2007 of a white law enforcement officer to replace its deceased sheriff, the Associated Press reported.

One of Williams’s career highlights was the arrest of Jamil Abdullah Al-Amin, or H. Rap. Brown, a former Black Panther who was convicted of killing a Fulton County sheriff’s deputy and injuring another in Atlanta in 2000.

Williams is survived by a wife and two adult children, according to Al.com. His son was at the scene of his father’s death, according to the site.

Charges against Johnson are pending as he’s still being questioned, according to Jarrett.

In August, Johnson was arrested on charges of possessing brass knuckles and being a minor in possession of alcohol, according to Al.com. Those charges were dismissed. Johnson is from Montgomery, Ala., and is the son of a law enforcement officer, according to the site.

Williams is the fifth law enforcement officer in Alabama to die by gunfire in the line of duty this year, according to Marshall.