Left high and dry by the state’s new bail reform...

Federal prosecutors on Sunday questioned whether the man accused of making a mockery of New York’s new bail-reform law by repeatedly robbing banks should have been locked up in South Carolina the entire time.

Gerod Woodberry, 42, has been convicted of five strong-arm robberies in the Palmetto State, according to court papers filed in a bid to keep him locked up following his arrest Friday.

On Sunday afternoon, Woodberry was hauled into Brooklyn federal court, where Magistrate Judge Steven Gold said “he was sentenced to 15 years but had seven suspended” following his most recent conviction in 2018.

“How is he here today?” Gold asked.

In response, prosecutor Jack Dennehy said, “I don’t really understand this, your honor.”

“The FBI did run a report and it seems to me was sentenced to 15 years, seven of which were suspended,” Dennehy said.

“Maybe it’s just my Catholic school education but the math just doesn’t add up. There seems to be no way he should be in Brooklyn in less than eight years.”

Federal defender Samuel Jacobson didn’t volunteer an explanation, and Woodberry — who wore a gray coat, gray pants and blue slip-on sneakers — wasn’t questioned about the situation.

Jacobson didn’t seek to have Woodberry released, but asked for a preliminary bail hearing, which the judge scheduled for Friday.

Jacobson also sought to have the case dismissed over a press release issued by US Attorney Richard Donoghue following Woodberry’s arrest Friday. In the missive, Donoghue said he was intervening to blunt the impact of new state bail reforms, which let defendants charged with non-violent felonies walk free without bail.

Gold denied the motion but said Jacobson could file papers over Donoghue’s statements.

Woodberry vividly illustrated the consequences of the new bail law when he allegedly knocked over a Brooklyn bank less than four hours after he was set free on Jan. 10 following his arrest for four Manhattan bank robberies.

“I can’t believe they let me out,” he allegedly said while retrieving his belongings from NYPD headquarters after the Jan. 10 release. “What were they thinking?”

Woodberry qualified because he’s not alleged to have used a weapon — only hand-written notes to demanded the cash.

He allegedly attempted to rob a sixth bank on Tuesday, but left that Citibank branch in Manhattan without any cash.

He surrendered Friday at the Manhattan criminal court building, sources have said.

After being taken into custody by the NYPD, he was turned over to the FBI.