SAN JOSE, Calif. (AP) _ A videotape a gay man made as a teen-age neighbor beat and kicked him was played for a judge Monday at the start of the youth's trial for the alleged hate crime.

William Kiley, 44, set up the camera June 11 to prove what he claimed were years of harassment that included epithets written on his car by the youth and his family.

''This is an extremely ugly case. This is a case about hatred and about violence,'' Deputy District Attorney Jacqueline Arroyo told Superior Court Judge Thomas Edwards, who is hearing the juvenile court case without a jury.

Defense attorney John McCardle said the incident was a neighborhood dispute.

The 45-minute videotape, which aired on national television, showed the youth, then 17, challenging Kiley to a fight as Kiley watered a lawn. Kiley doused the teen, who attacked, striking blows with fists and feet.

Although the sound is murky, the teen-ager is heard calling Kiley ''queer'' and ''faggot.'' His mother joined in with other expletives.

The video ends with Kiley turning the camera on his two black eyes, a broken nose and cuts and bruises. Kiley still wears a neck brace.

The teen, now 18, faces three felony charges under a hate-crime statute. His name is being withheld unless he is found guilty. He could be held until age 25 under juvenile laws.

Questioned by McCardle, Kiley acknowledged he told police that he and the teen's family hadn't gotten along for three years.

McCardle implied that Kiley provoked the attack, alleging over strong objections from the prosecutor that Kiley kept his voice down during the videotaped confrontation so inciting words from him couldn't be recorded.

Kiley has filed a $20 million civil lawsuit against the young man and his family. The handyman said he was forced to move after publicity brought more harassment from others driving past his home.