An Erie County Sheriff's deputy died Wednesday in the lockup area of Buffalo City Court in downtown Buffalo, sheriff's office spokesman Scott Zylka said.
The death appears to be a suicide, he said.
The incident took place in a secluded part of the holding area. No other people were present, officials said.
The deputy's name has not been released. Sheriff Tim Howard and other sheriff's officials were in the process of notifying and talking to family members, Zylka said.
Grief counselors were expected to be made available to co-workers along with other employee assistance program services.
"This is a somber day, and we ask for your patience as we continue to physically, mentally and emotionally work through this," Zylka said.
Crisis Services offers 24-hour help for anyone experiencing a crisis situation by calling 716-834-3131.