The Placer County Sheriff's Department is honoring an "end of watch" for a deputy killed in the line of duty nearly 160 years ago by infamous Auburn outlaw "Rattlesnake Dick."

"One of the coal mining areas on the American River is Rattlesnake Bar, so he got the nickname from Rattlesnake Bar," said Carol Cramer, a historian. "So he became 'Rattlesnake Dick.'"

According to the sheriff's department, Deputy George W. Martin was killed on July 11, 1859, during a shootout with Rattlesnake Dick Barter and his gang while trying to arrest the group in Auburn. Martin was killed and an undersheriff was wounded during the shootout. Barter also suffered significant injuries during the gun battle, but he managed to escape on horseback.

The day after the fight, a posse led by Deputy John C. Boggs found Barter's body on the side of the road near "The Junction House," a stagecoach stop in Auburn at the intersection of what is now Lincoln Way and Foresthill Road.

The sheriff's department said Barter died by suicide and left a note that read, "If J. Boggs is dead, I'm satisfied."

The note indicated that Barter mistakenly believed he killed Boggs during the shootout. Barter considered Boggs his nemesis.

Many people during that time paid their respects to Martin who was killed. He was a Placer County pioneer.

"When he got buried the first time, the whole town came out for the funeral since he was a law enforcement person and he had been murdered," Cramer said.

A plaque to remember what happened sits outside a Raley's parking lot at the intersection of Lincoln Way and Foresthill Road. There's also a mystery of hidden gold the Rattlesnake Dick and his gang left behind.

"Two guys in the gang took $40,000 cause I guess that's what they could carry and they hid the other $40,000," Cramer said. "Somewhere up in those mountains is $40,000 you just gotta go find it."

Follow more on the conversation with ABC10’s Ananda Rochita.