A man known as the Red-Bearded Burglar was finally arrested on Thursday, ending the nine-month search operated by the Mendocino County sheriffs.

40-year-old William Evers, according to Mendocino County Sheriff’s Office release, was caught after being seen leaving “brushy terrain” in the Salmon Creek Forest. He tried to escape but was caught by a K-9 named Takota, SFGATE reported.

Before the day of the arrest, Evers was reportedly seen by a resident in an outbuilding close to Albion. Evers was said to be defecating that time but fled into the forest before officers came to the location, the sheriff’s office said.

Evers managed to evade arrest for nine-month following a series of burglaries in Mendocino County which were believed to be his doings. The incidents started in February, and in May, a man believed to be him fired at a sheriff’s deputy in Elk town, amid a burglary.

Evers was seen again a month after the burglary, now in another burglary case in the same town.

In August, he was reportedly spotted at a resident’s vegetable garden at nighttime.

A flyer distributed by Mendocino County Sheriff’s Office of the alleged Red-Bearded Burglar.

Evers became known as the local legend over the months he managed to escape the law. One of the residents has even made a jack-o-lantern inspired by the suspect’s beard.

Mendo Fever, a local news blog, said that Evers even smiled in a photo to document his arrest as the sheriff told him how he was known in the neighborhood.

But those who idolize him should be wary of Evers, said Mendocino County Sheriff Matt Kendall.

“It’s easy for people to say things about Evers, right up to the point where they are the ones that get burglarized, one of the most invasive crimes where your home no longer feels safe,” Kendall told Mendo Fever.