Updated

A man caught climbing a fence at a Southern California jail on Sunday was trying to get in, not out, authorities said.

Sheriff's officials said 28-year-old Shane James McDonald wasn't a prisoner at the Central Detention Center in San Bernardino when he was spotted scaling the perimeter fence early Sunday. But he did have a warrant out for his arrest.

The Riverside Press-Enterprise reported that McDonald was arrested on suspicion of trespassing and on the warrant. It's not clear on what charge he was wanted.

Officials aren't sure why McDonald wanted to get into the jail, but that's where he ended up. He's being held in lieu of $25,000 bail.

It wasn't immediately known if he had an attorney who could speak on his behalf.