A self-described white nationalist who claimed he was a “friend” of Pittsburgh synagogue shooting suspect Robert Bowers was busted on a gun charge after claiming the massacre was a “dry run.”

Jeffrey Clark Jr., 30, was charged with illegally possessing a firearm and a high-capacity magazine intended for use with AR-15 assault weapons, the Washington Post reported.

The Washington, DC, resident made his initial court appearance Tuesday in US District Court in Washington and was ordered held until Friday.

Clark was arrested Friday after two family members reported his disturbing outbursts after his brother Edward committed suicide — including that the 11 victims at the Tree of Life synagogue “deserved it.”

Clark’s 23-year-old brother fatally shot himself on Roosevelt Island near Washington three hours after the Oct. 27 attack in Pittsburgh, the paper reported, citing court filings for the suspect.

After the death, Clark told his relatives he believed Bowers, 46 was a friend on conservative social media platform Gab, according to the court filing.

Jeffrey Clark was “DC Bowl Gang” on the site and his sibling went by “DC_Stormer,” according to the documents.

Clark posted a photo on Gab of him and his brother wearing masks and holding a shotgun and a rifle, in front of a flag with a skull and crossbones, the court papers say.

He posted a description of himself as a “Meth-Smoking, Pipe bomb making, mailman-murding [sic] . . . Che Guevara of the altright.”

Of the massacre at the synagogue, the court filings said Jeffrey Clark posted a picture of the suspected shooter spattered in blood and wrote: “This was a dry run for things to come.”

The court filing lists what prosecutors say are some of Clark’s postings, including a Gab rant that claimed the victims of the synagogue attack “were all active supporters of pedophilia … and every last one of them deserved exactly what happened to them and so much worse.”

Clark, who called Bowers a “hero,” said the synagogue attack was justified because, he believed, “a homosexual Jewish couple was having an adopted baby circumcised that week,” according to the court filing.

He told the feds that he and his brother became interested in guns in 2016 “because they believed there was going to be a civil war,” according to court filings.

The FBI said the brothers attended last year’s “Unite the Right” rally in Charlottesville, Virginia.

Their relatives told agents they believe the two men had photos from the event with James Alex Fields, who was accused of driving a car into a crowd of protesters, killing Heather Heyer, 32, and injuring 19 other protesters.

The witnesses also told the FBI that the brothers “admired” Timothy McVeigh, Ted Kaczynski and Charles Manson — and wanted to “expedite” a brewing race war, according to NBC News.

The feds alleged that Clark once said he and his brother had fantasized about killing “Jews and blacks.”

The pair had four guns that were registered in DC — a Remington Arms handgun, a Mossberg shotgun, a Beretta handgun and a Ruger Mini-14 rifle, the documents said.

The Beretta was recovered at the site of the suicide and agents seized the other weapons from a relative’s home outside Washington.

Clark also surrendered a Colt .38 handgun that was not registered to either brother. The FBI also confiscated two kits to convert semi-automatic AR-15s to fire in full automatic mode.

Authorities said they found two muzzleloading handguns in Jeffrey Clark’s bedroom and in the basement of his home. They found two ballistic vests, two ballistic helmets and two gas masks in his brother’s room, the court documents said.

Clark did not enter a plea and said little at his court appearance other than confirming he was a high school graduate and needed an appointed attorney.

Assistant federal defender David Bos declined to comment to the Washington Post.