A Northern California man igniting illegal fireworks blew off both of his hands when a device exploded prematurely, police said.

Officer Albert Morales of the San Jose Police Department said the man is expected to live. The explosive went off in the man's hands as family members stood nearby late on the Fourth of July holiday.

"It would have had to have been something pretty powerful," Morales told the San Jose Mercury News.

According to the Los Angeles Times, the man, Alazar Ortiz, 40, had his right hand amputated by doctors as a result of the accident and lost a couple of fingers of his left hand.

Family members told local media that Ortiz is a construction worker and won't be able to make a living anymore.

The Mercury News also reported that two other men were seriously injured in Sunnyvale while lighting a mortar-like explosive on Friday.

The Sunnyvale Department of Public Safety said that at 10 p.m. the men — ages 41 and 32 — were hurt at an apartment complex when the illegal firework ignited prematurely. Witnesses in a group of about 20 people said the men had been trying to ignite the firework when it went off in their hands, officials reported.

Police didn't release the names of the individuals involved.

One man lost fingers on his left hand and finger tips on the right hand, while officials said the other man lost part of his right hand.

In Southern California, a man lost his thumb Friday after the firecracker he was holding exploded in his hand, Long Beach police said Sunday.

The Associated Press contributed to this report.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino