HALF MOON BAY — A 62-year-old man trespassing at a construction site to look for his friend’s lost cat named Domino instead met a police dog named Riggs, who attacked and bit his legs at the command of sheriff’s deputies, according to a federal lawsuit filed Friday.

Afterward, the San Mateo County Sheriff’s deputies allegedly handed Richard Earl May Jr. a sticker of a German Shepherd. “I met Riggs,” the lawsuit claims it said.

“It was an outrageous and totally unjustified use of a police dog,” May’s attorney Michael Haddad said Friday. “The dog handler thought this whole thing was funny and gave Richard the dog’s card when this was all over as if it was a joke.”

A San Mateo County sheriff’s spokesman referred questions to county lawyers who were not available for comment Saturday.

May and a 72-year-old friend were out looking for Domino at about 10 p.m. on Jan. 1 when they heard the cat meowing from inside a building at a construction site on 1 Bloom Lane near their homes in Half Moon Bay, according to the lawsuit.

No security guards were at the site and a call to the number posted there led to a medical supply company in Ohio, so May went in looking for Domino, the suit says. Doing so triggered an alarm and brought the San Mateo County Sheriff’s Office to investigate the trespassing.

The lawsuit said deputies Chris Laughlin, Eric Michel and John Sanchez gave Riggs commands and he first sniffed at May then attacked him after more commands. The police sniffing dog bit May’s legs, causing wounds requiring stitches and injuries that affect May today, Haddad said.

May, who was detained and questioned for trespassing on the property, ultimately did not face any criminal charges, according to the suit. His attorney said he did not resist arrest or try to run away and was no threat to the deputies.

May is suing for violation of his civil rights and personal injuries, among other claims. The lawsuit lists the deputies, San Mateo County and its Sheriff Greg Munks as defendants.

Born in 2010, Riggs has served the sheriff’s North County patrol since 2011 and specializes in narcotics detection, tracking, evidence recovery and suspect apprehension, according to his sheriff’s office biography. Laughlin is his listed handler.

“Police officers have a job where they have to accept some risk, that’s why they are trained to go up to people and talk to them, not just sic a dog on somebody,” Haddad said.

As for Domino, the cat was rescued and in the arms of May’s friend as the deputies arrived.

“As soon as the dog started running at him, the cat ran off, jumped over the fence and ran back home,” Haddad said.

David DeBolt covers breaking news. Contact him in Oakland at 510-208-6453. Follow him at Twitter.com/daviddebolt.