While Congress and the White House dither over gun control, a new background check law goes into effect in New York Thursday that closes the so-called “Charleston Loophole,” which let church shooter Dylann Roof buy the weapons for his 2015 shooting spree that killed nine black worshippers.

The new law creates a 30-day period before allowing a sale to proceed if a background check does not come back instantly with a “proceed” notification from the National Instant Criminal Background Check System (NICS) used by the FBI.

The prior state law said a firearm sale must be allowed after three days, even if a background check does not come back with a response.

State Senate Deputy Majority Leader Michael Gianaris (D-Queens), who drafted the bill in Albany’s upper house, said, “Common-sense gun safety reform will save lives, period. Stronger background checks will keep guns away from dangerous people.”

Assemblywoman Amy Paulin (D-Westchester), author in the lower house said, “Most background checks come back quickly and cleanly from NICS. This law will not hinder a law-abiding citizen’s ability to purchase of a gun. But I’ve talked to the FBI and on too many of these cases, they just need more time.

“Given the constant challenges we face keeping our families and communities safe from mass shootings, from terrorism, from domestic violence and from so much else, I’m proud that New York has shown such leadership in keeping guns out of the wrong hands,” she added.

Gov. Andrew Cuomo signed the extended background check law on Jan. 29.

The Gifford Law Center to Prevent Gun Violence nicknamed the problem with the background checks system the “Charleston loophole.”

That’s because Roof, the confessed shooter at Emanuel AME Church in Charleston, received a “delayed” designation on his background check and would have been denied the weapon that he would later use in the massacre because of a prior drug arrest — if there had been more time to complete the check.

Meanwhile, President Trump Wednesday said he was making progress negotiating with senators from both sides of the aisle on a measure he proposed calling the “Gun Sense Bill.”

“I spoke with Senator Toomey and Senator Murphy and Joe Manchin, just had a long talk with them just before this meeting, just hung up,” the commander in chief said from the Oval Office, of Democrats Manchin of West Virginia and Chris Murphy of Connecticut and Republican Pat Toomey of Pennsylvania.

“It’s really ‘Gun Sense,’ if you think about it,” Trump said, suggesting that any bill lawmakers come up with should bear that name.

“We’re having great dialogue. We’ll see what happens.” Trump said meetings would go on later adding: “I think progress is being made.”

Asked if he supported background checks on all private gun sales, the president was non-committal.

The politics are much different in DC than in Albany.

New York State government is controlled by Democrats who back gun control.

But in DC, Trump and the Republican-led Senate are backed by the National Rifle Association, which opposes gun restrictions as an infringement of its Second Amendment rights. Republicans for years have been wary of bucking the gun lobby despite a spate of shooting massacres that spurred a public cry for stricter gun control measures.