A mechanic accused of igniting a wildfire that killed five firefighters in 2006 had worked for months to perfect an incendiary device, a prosecutor told jurors Thursday in closing arguments.

Raymond Oyler, 38, experimented with different types of devices and terrain before he started the deadly blaze, Deputy District Attorney Michael Hestrin told the Riverside County Superior Court jury.

"He knew this fire was going to race up that mountain, and he also knew these brave men were going to go racing up that mountain ... and stand toe-to-toe with that fire," Hestrin said. "He knew that, and he did it anyway."

Oyler pleaded not guilty to five counts of first-degree murder, 23 counts of arson and 17 counts of using an incendiary device. He is accused of setting blazes during a five-month period in 2006, from May 16 to the fatal fire on Oct. 26 that destroyed 34 homes and 20 outbuildings and charred nearly 70 square miles. He could face the death penalty if convicted.

The prosecutor reminded jurors that arson investigators found the remains of incendiary devices made of wooden matches bundled around or laid over a cigarette and attached with rubber bands or duct tape after some of the fires. The cigarette would be lit as a "timing device," allowing an average of 10 minutes before the matches were sparked, Hestrin said.

Hestrin said Oyler was active in setting fires during a period when he did not have full-time employment, and that once he began working again, the number of fires set decreased.

The prosecutor also said no fires were set for six weeks following a fight between Oyler and his fiancee during which she confronted him about starting fires and threatened to leave him.

Two of the incendiary devices had Oyler's DNA on the cigarette, but Oyler's attorney, Mark McDonald, said that didn't prove his client set the fatal blaze.

"When you look at the evidence in this case ... it's theories, theories," he said. "The theories they've presented to you are not even accurate."

McDonald said testimony showed that Oyler was at home watching his 7-month-old daughter when the deadly fire broke out and that he could not be the arsonist.

McDonald also challenged the assertion that all the fires were set by one person. An expert on arson and incendiary devices testified for the defense that as many as three people could have set the blazes because of subtle differences in the cigarette devices used to start them.

McDonald said investigators rushed to pin the blame on someone because of public outrage after the blaze and then scrambled to fill holes in the evidence.

"In the big scheme of things, Raymond Oyler's fight is not against the evidence in this case," he said. "Raymond Oyler's fight is against human emotion. Raymond Oyler's fight is against the death of five heroes, that tragedy."

Five firefighters were overrun by flames while defending an unoccupied home in the San Jacinto Mountains, about 90 miles east of Los Angeles: Jason McKay, 27; Jess McLean, 27; Daniel Hoover-Najera, 20; Mark Loutzenhiser, 43, and Pablo Cerda, 23.