LOS ANGELES — Police arrested a man who tried to grab the boyfriend of Paris Hilton as the couple arrived Wednesday at a courthouse to testify against a suspect in an attempted break-in at her home last year.

An Associated Press photographer and reporters interviewing the couple saw the man appear to get a hand on the neck of Cy Waits before being seized by a bodyguard and taken away.

James Rainford, 36, was arrested on suspicion of misdemeanor battery on a person and was being held on $20,000 bail.

The incident occurred as Hilton and Waits walked into a Superior Court building in Van Nuys to testify against Nathan Parada, 31, who is charged with attempted first-degree felony burglary.

Hilton posted on her Twitter account that a "psycho intruder just punched Cy in the back of the head as we were walking into the court house."

She and Waits testified about being awakened by a man banging on a window at her home last August. They left the courthouse without further incident.

Police Detective Kevin Romine testified that Parada told him and his partner that he had left a halfway house in Redlands, California, several days before going to Hilton's home with the intention of robbing it.

Parada told police he found the Hollywood Hills house after purchasing a map of stars' homes, then stayed outside for several hours before going to a back window and pounding on it with the butt of a knife, Romine said.

During his interview, Parada told detectives that he planned to steal whatever he could carry, sell it and move to a deserted island, Romine testified.

Parada also told police that he had not taken his antidepressant medication for several days before going to Hilton's home, the detective said.

He said Parada knew there was at least one person inside but didn't plan to hurt anyone.

Police were told Hilton's home was targeted because she is famous and she was from a rich family, Romine said.

Deputy District Attorney Kaveh Faturechi said he expects to conclude his case Thursday. Parada could face a maximum of three years in prison if convicted. (AP)