The Suffolk County Courthouse in Riverhead was evacuated Friday due to a bomb scare.
Police tell News 12 a person left a backpack hanging on the back of a door in a public area.
It was deemed suspicious, so the building was evacuated.
The sheriff's office says a person admitted to leaving it there to scare people.
That person was taken into custody and is expected to be charged.