A 30-year-old man is accused of punching and clawing at the face of a deputy in the locked basement of the Multnomah County Courthouse earlier this week.

It's unclear what exactly Rory Ian Dwayne Gaines was thinking walking through the bowels of the eight-story downtown Portland building, authorities said. But Gaines’ 9-year-old son, who was with him, said his dad told him he needed to get out or else he was going to jail, according to a probable cause affidavit filed by the prosecution.

Court records show Gaines had no court appearances and no orders to take him into custody. Although Gaines has a criminal history that includes car theft and had previously served time in jail, he was last convicted in 2016 and had no active cases.

“We don’t know why he was there,” said Sgt. Brandon White, a spokesman for the Multnomah County Sheriff’s Office.

Using surveillance cameras, security staff on Monday spotted Gaines’ son in the basement, which is closed off to the public. Deputy Steven Meyer went down to escort the boy out, according to the affidavit.

That’s when Meyer discovered the boy’s father was there, too, investigators said. Gaines punched Meyer in the face, knocking off his glasses, according to the affidavit.

The two fell to the ground and Gaines punched Meyer again and “clawed at his face with his fingernails” before the deputy was able to restrain Gaines and other deputies arrived, the affidavit states.

Meyer said Gaines tried to get his son to help during the scuffle by yelling at him to join in, according to the affidavit.

Gaines was booked into the downtown jail at 12:20 p.m. that same day. He remained there Thursday in lieu of $11,500 bail.

He faces charges of felony assault on a public safety officer, felony fourth-degree assault and misdemeanor harassment.

Meyer said told investigators his pain was a 4 on a scale of one to 10, with 10 being the worst pain.

“He’s a little scratched up from the fight, but he’s doing well,” White said.

-- Aimee Green

Visit subscription.oregonlive.com/newsletters to get Oregonian/OregonLive journalism delivered to your email inbox.