Sam Cogen will lead the sheriff's office in Baltimore City after a narrow win against longtime incumbent John Anderson.
Cogen garnered 51.8% of the vote including mail-in ballots while Anderson had 48.1%, according to the Maryland Board of Elections final results.
Cogen, a former sheriff's office employee, declared victory on Friday night.
"Our next step is to form a transition team focused on reorganization and modernization, which will enable us to implement best practices from the moment we take office," Cogen said in a news release.
There is no Republican challenger in the general election race in November.
His goals are to modernize the sheriff's office processes and humanize the eviction process, which was something Anderson was criticized about during his tenure by housing advocates.
Anderson served as Baltimore city's sheriff for the past 36 years, the longest tenure in the state.