A former Astoria resident accused of waging a local campaign of intimidation will serve a 24-year prison sentence for charges stemming from a shootout with Portland police last January.

As part of a plea agreement with Multnomah County prosecutors, Clayton Jasmin on Friday pleaded no contest to charges of second-degree assault, attempted first-degree assault and unlawful use of a weapon and accepted a sentence of 24 years and three months in prison. He will be formally sentenced July 16.

The charges stem from a standoff Jan. 2 when Jasmin fired shots from his southeast Portland apartment at a passing Tri-Met bus, injuring a passenger, then shot through his front door at police who unwittingly knocked on the door in the course of evacuating residents.

Jasmin, 38, was charged in connection with several incidents last year in which homemade bombs were left near a vehicle in an Astoria neighborhood.

In July, an explosive device was found next to a vehicle in front of a home at Sixth Street and Klaskanine Avenue. Bomb disposal experts from Oregon State Police and Marion County were called in to disable the device, which consisted of several bottles filled with gasoline or solvent, wired to a battery and toggle switch.

The vehicle owner told police he was unaware who might have been responsible, but said a pipe bomb had been placed under the vehicle about six months earlier, and that the vehicle's previous owner had been the source of several threats. Two neighbors also told police they saw a white Bronco or Blazer-type vehicle driven by a man in his mid-30s parked in the neighborhood on several occasions during the past year.

In the local indictment, Jasmin was charged with multiple counts of unlawful possession of a destructive device, unlawful use of a weapon, menacing and recklessly endangering another person. According to the Clatsop County District Attorney's Office, there was no attempt to set off the bombs, which were apparently meant to intimidate the victim, but the devices were large enough to cause considerable harm.

After his arrest following the Portland shooting, Jasmin admitted to planting bombs outside a Multnomah County office building in October and on a Tri-Met bus in December. A search of his Portland apartment by police turned up bomb-making materials and several firearms and ammunition, as well as a gas mask and bulletproof vest.

Jasmin was originally charged with attempted aggravated murder, felon in possession of a firearm and other charges in connection with the Portland incident.