A 19-year-old man who planned to join the Marines this fall has lost a hand and a chunk of his leg after illegal fireworks exploded in his pockets.

Josh Myers was attending a bustling Fourth of July party on Sunday night when he said a floating ember ignited bottle rockets in his back pocket. The flames quickly spread to his front pocket, which held two sticks of M-1000, a powerful firecracker equivalent to about a quarter-stick of dynamite each.

Myers said he bought the firecrackers on the street for $10 each.

He said he felt heat coming from the front pocket and realized the firecrackers were about to explode. He managed to push a 2-year-old girl out of the way before the blast, put his left hand over his pocket and fall to the ground.

“At first, I didn’t think I lost my hand. I thought I just took a pretty bad blow. But then I ended up looking, and I was like, yeah, I saw it. My hand was gone,” Myers said.

The blast seriously injured the girl’s leg. Witnesses said the damage could have been a lot worse if Myers had pulled the firecrackers out of his pocket near a crowd of people.

“The 2-year-old baby, she got a chunk blown out of her leg,” said Demetrios Paxinos, who attended the east Oakland party. “She had stitches inside and outside of her leg. But it would have been a lot worse.”

The teenager, who had planned to join the military in September, is recovering in an Oakland hospital.

“It took away my dream, which was to join the United States Marine Corps and defend my country, but the thought that just keeps going through my head is it’s better me than that little girl,” he said.