An opium-growing recluse wanted in connection with two murders in northern California was shot to death by police officers on Saturday, capping a five-week-long manhunt through dense, rugged woodlands.

Three SWAT team officers opened fire on Aaron Bassler, 35, as they encountered the fugitive walking toward them on a logging road, dressed in black and carrying a loaded assault rifle, said Mendocino County Sheriff Thomas Allman.

Allman told a news conference that Bassler was struck by about seven gunshots and never had a chance to return fire, though his weapon was discovered with a round in the chamber and its safety mechanism off.

He was fully ready to engage, Allman said.

Bassler, said by his father to be mentally ill and living as a virtual hermit in Mendocino County's coastal mountains, was pronounced dead immediately after the shooting, which unfolded at about 12:20 p.m. local time near the town of Fort Bragg, about 150 miles north of San Francisco.

Bassler had been on the run since authorities say he gunned down a Fort Bragg city councilman, Jere Melo, who was working as a timber company property manager when he was slain on August 27. Melo, 69, was ambushed as he stumbled onto an opium poppy garden being tended to by Bassler in the woods, police said.

Investigators later found evidence linking Bassler to the earlier shooting death of another property manager, Matthew Coleman, 45, who was found dead on August 11 near his car after patrolling a stretch of forest in the Fort Bragg area.

For five weeks, dozens of law enforcement officers from around the state had pursued Bassler in a search that covered 400 square miles, with the suspect keeping one step ahead of the manhunt as he broke into cabins to steal guns and supplies.

He was photographed by a surveillance camera at one cabin, holding a rifle, and exchanged gunfire with police on Thursday before slipping back into the woods again. No one was hurt in that confrontation.

Allman said Bassler was discovered to have broken into a truck shop on Friday night, and he was tracked by a blood hound to an area just two miles from his mother's home, where police confronted him for the last time on Saturday.

Allman insisted police were not operating under a shoot-to-kill order, but he acknowledged that the three-man SWAT team did not try to communicate with Bassler before opening fire on him.

Nevertheless, Allman said, I fully support the manner in which this ended, adding that the suspect's previous actions led us to believe that any contact with law enforcement was going to be met with deadly and lethal resistance.

The fugitive's father, James Bassler, has said his son had a history of undiagnosed mental illness, with symptoms resembling schizophrenia, dating back to his teenage years.

The father said Bassler had been supporting himself by growing marijuana until about 2005, and that the opium patch Melo uncovered was likely used by his son for himself.

James Bassler said that as his son had grown increasingly isolated and erratic, the family had sought help from authorities, but no one paid attention.