(CNN) Two agents with the North Carolina State Bureau of Investigation's Bomb Squad were injured, one critically, in an explosion Friday morning in an eastern county, the SBI said.

Jimmy Tyndall, 33, is in custody, Sampson County Sheriff Jimmy Thornton told reporters. The explosives had been found in a car Tyndall was driving and at his residence, Thornton said.

Agents Timothy Luper and Brian Joy had been called in to help after Sampson County deputies found homemade bombs and bomb-making materials in a search after a traffic stop Thursday afternoon. The explosion happened as the agents were working to dispose of the material, the SBI said in a statement.

Deputies on Thursday stopped Tyndall's vehicle and found pipe bombs during a search, Thornton said. The sheriff said he thought the driver had been stopped for speeding, but then the officers noticed the explosives.

"Once they began looking, the devices were readily seen," Thornton said. "At that point, then everybody backed away and did nothing else until the SBI bomb squad arrived."

Read More