Updated

A man believed to be the disgruntled employee who opened fire on his co-workers at a California limestone quarry was shot and killed by deputies Thursday, bringing an end to a heavily armed manhunt in Silicon Valley.

Three deputies on routine patrol in a Sunnyvale neighborhood encountered the man matching Shareef Allman's description around 7:30 a.m., Santa Clara County Sheriff Laurie Smith said. He was crouched behind a vehicle in the driveway of a home.

The deputies opened fire after the man "displayed in a threatening manner his firearm," Smith said.

Investigators believe the man is the 47-year-old Allman, but the coroner will have to confirm the identity, she said. Sheriff's officials said the search was called off by Thursday afternoon.

"I'm glad that we were able to reach a resolution. It's unfortunate that an additional person died, but it's over, and my concern is the public safety of the county," Smith said.

The shooting took place in a residential area about 5 miles east of the Lehigh Southwest Cement Permanente Plant, where Allman allegedly opened fire during a routine safety meeting a day earlier. Three people died and six were wounded.

Authorities believe Allman also shot a woman in an attempted carjacking a couple of hours after fleeing the quarry.

News that Allman was the suspect in these attacks shocked his friends, who described him as a devoted single father of two and a longtime community volunteer.

Close friend Brandon Powell said he was horrified to learn of the shootings because Allman had mentioned taking a gun to work days before the attack, but Powell, 20, believed the man he called "uncle" was joking.

Powell told The Associated Press that Allman visited him in Sacramento on Saturday and showed off a recently purchased AK-47 assault rifle. Allman was an avid gun collector who was registered with the state, he said.

When Powell asked Allman what the gun was for, Allman said: "`There's some racist people at my job. They're messing with me,"' Powell recalled.

"We started laughing, so I didn't think he was serious," Powell told the AP in a phone interview Thursday. He added, "He wouldn't hurt nobody. He's not that type of person. He must have snapped."

Powell said he had not contacted authorities but would be willing to speak with them.

Sheriff's spokesman Lt. Rick Sung said Thursday that he was not aware of Powell's claims. He added that any information regarding Allman's motive would be part of the ongoing investigation.

Authorities have not released any details about a possible motive, other than to say the suspect was disgruntled.

Allman was recently suspended following an accident in which he hit a power line while dumping a truck load at the quarry, according to Bill Hoyt, secretary-treasurer of Teamster's Local 287.
Hoyt said Allman visited his labor union offices on Friday, saying he felt he was being treated unfairly by cement plant management, Hoyt said.

"He told me he had gotten a suspension and didn't feel that the punishment fit the crime," Hoyt said. "But he was fine, and didn't seem angry, we talked and joked around. There was nothing weird about him."

Another longtime friend, Walter Wilson, said Allman complained of racism at work, but he didn't think it was a major issue for him.

"As far as I know he was the only African-American truck driver," Wilson said. "He told me the company was racist."

"I tried to tell him to go through the process, and he said he felt like he had it under control," said Wilson, who last saw Allman three weeks ago at a music festival and described him then as happy and jovial.

In addition to working at the quarry, Allman had run a nonprofit group for youths and produced and hosted a public access television show for CreaTV in San Jose. He also wrote a novel titled "Saving Grace," about the evils of domestic violence.

"He spent his life in the service of other people," Wilson said.

According to authorities, Allman became upset around 4 a.m. Wednesday during the meeting at the quarry. He left briefly and returned with a handgun and rifle and started shooting people, Lt. Sung said. About 15 workers were at the meeting.

The dead were identified as Manuel Pinon, 48, of Newman, Calif., and John Vallejos, 51 and Mark Munoz, 59, both of San Jose. Six others at the quarry were wounded and taken to hospitals, where some were in critical condition, Smith said.

Later Wednesday morning, authorities received a 911 call reporting an attempted carjacking by a man matching Allman's description. The shooter fled on foot after using a weapon similar to a gun used in the quarry shooting, authorities said.

The carjacking victim, a Hewlett-Packard contract employee, was in fair condition at Santa Clara Valley Medical Center, hospital spokeswoman Joy Alexiou said.

She said a quarry shooting victim was listed there in good condition Thursday, and another victim was treated and released shortly after the shooting.

Sung declined to release any information about the conditions of the remaining victims.

During the ensuing manhunt for Allman, schools were locked down in Cupertino, home of Apple Inc., and in nearby communities. Authorities went door to door with guns drawn and residents were warned to stay indoors.

"The SWAT stormed in like ninjas, and they took a position in our front bedroom," said Jenny Martin, a resident of the neighborhood searched by authorities Wednesday and where man believed to be Allman was killed.

Authorities said they found Allman's car, and collected a shotgun, a handgun and two rifles believed to belong to the suspect.

Sheriff's officials did not immediately release the names of deputies involved in the suspect shooting but described them as two men and one woman who all had less than five years with the agency. Sheriff Smith praised their work, saying they "did a great job at the scene."