A 34-year-old man was shot and killed by a Daly City police SWAT team in Pacifica after he stabbed an officer at the end of a six-hour standoff, authorities said.

The incident began shortly before noon Tuesday when Pacifica police were summoned to a home on San Pedro Avenue by family members who reported that Errol Chang was "displaying paranoia behavior" and was possibly armed with an ax, said Pacifica police Capt. Joe Spanheimer.

Officers found Chang in the backyard, but he refused to obey their commands and brandished the ax at them, Spanheimer said. He said officers were told by Chang's relatives that he may have had access to a rifle and ammunition hidden in the house, Spanheimer said.

As a precaution, neighbors were evacuated as officers tried unsuccessfully to communicate with Chang, and as Pacifica police asked the Daly City police SWAT team to respond. They threw a phone into the home, but the man refused to use it or respond to officers talking on a public-address system, officials said.

More than six hours after the standoff began, the SWAT team used a flash-bang grenade in hopes of getting Chang to come out of the home, then made their way inside, at which point Chang stabbed one of the officers with a knife, police said.

In defense of that officer, "The subject was fired upon and was determined deceased at the scene," Spanheimer said.

The injured officer's wounds were not life-threatening. The incident is under investigation by Pacifica and Daly City police and the San Mateo County district attorney's office.

Court records show Chang was convicted of felony theft for an incident at San Francisco International Airport in 2008. He was sent for psychiatric treatment at Napa State Hospital for several months before he was placed on three years of probation.