Police learned about the incident when Kaiser Hospital informed them that a man had arrived there with serious injuries caused by an explosive device, Vacaville police Sgt. Charlie Spruill said.
Investigators determined that a group of about seven people had gathered at Centennial Park at 501 Browns Valley Road before the pipe bomb exploded around 10:20 p.m.
Spruill said Vacaville resident Bryan Cook ignited the pipe bomb using a homemade fuse but that it exploded prematurely in his hand before he could throw it. Cook's friends took him to the hospital.
Cook and a 17-year-old boy, also from Vacaville, were arrested on suspicion of manufacturing, transporting and possessing an explosive device, Spruill said.
No other pipe bombs or bomb-making materials were found at the scene.