A Maryland man was indicted on charges of child pornography and weapons offenses after a package containing hundreds of rounds of ammunition broke open at a U.S. postal facility and attracted the attention of investigators, court files show.

Caleb Andrew Bailey, 30, of Waldorf, was indicted Wednesday in federal court in Greenbelt. Prosecutors allege Bailey created and possessed child pornography, possessed a machine gun and unlawfully transported explosive materials.

The four-count indictment included few details about the child pornography allegations.

An affidavit in support of an arrest warrant detailed Bailey’s alleged attempts to ship ammunition through the U.S. mail.

On Feb. 18, according to the affidavit, a package “ruptured open” at a U.S. postal facility in Capitol Heights. Among other items, the package, allegedly paid for with a debit card linked to Bailey and addressed to a firearms store in Wisconsin, contained items including 119 rounds of reloaded .50-caliber cartridges and 200 rounds of 14.5mm spotting projectiles with an explosive charge, the affidavit said. Those who buy or ship such ammunition must have a permit, but Bailey did not, according to the affidavit.

On Feb. 25, the affidavit said, Bailey used a false name and contacted USPS customer service with a tracking number to ask about the fate of the package, which the caller said had not been delivered. He called again on March 3, using his real name, according to the affidavit. Authorities set up a meeting with Bailey at a postal facility on May 5 about the package, but he failed to show, the affidavit states.

After Bailey missed the meeting, according to the affidavit, authorities executed search warrants on properties associated with Bailey, including his residence, and seized a machine gun.

Bailey was one of three top vote-getters in Maryland’s 5th Congressional District to serve as a delegate at the GOP National Convention this summer, according to Joe Cluster, the executive director of the Maryland Republican Party. Bailey ran as a delegate for Donald Trump.

Cluster said Bailey is “presumed innocent, but if he is in jail and can’t go [to the convention] . . . or makes bail and can’t travel” then the state party would replace him with the person who received the most number of votes in the alternates category.

Bailey’s attorney, William C. Brennan, declined to comment.