The man was stopped by U.S. Park police around 9 p.m. near 900 Mason St. in the Presidio near Crissy Field, according to NPS spokeswoman Alexandra Picavet.
The driver told park police he had fireworks in his back seat. This prompted officers to call the San Francisco Police Department's bomb squad to assess the explosive items.
Two businesses nearby, the indoor trampoline park House of Air and rock climbing gym Planet Granite, were evacuated and the road was closed as the bomb squad responded, according to Picavet.
No injuries or damage was reported.
A bomb technician was unable to determine what the explosive items were, but confirmed they were active with the potential to explode, Picavet said.
The explosives were taken to a safe location on the Crissy Field beach and were detonated around 1:15 a.m., she said.
The man was arrested on suspicion of possessing illegal substances when marijuana was allegedly found in his vehicle, Picavet said.
He was arrested and later released, Picavet said. She did not know the man's name.
More charges in connection with the explosives found in the vehicle are pending, Picavet said.