WASHINGTON — In an extraordinary attack, the White House on Wednesday slammed Sen. Charles Schumer for criticizing the administration’s proposed cuts to homeland security funding — labeling Schumer “wrong” and even calling his “credibility” on homeland security into question by digging up a sore point in his voting record.

White House press secretary Josh Earnest delivered the unusual broadside at the man presumed to be the next Senate Democratic leader, just hours after Schumer, Mayor Bill de Blasio and Police Commissioner Bill Bratton denounced federal cuts to urban security funds.

While it’s not uncommon for the White House to go after the president’s harshest Republican critics, taking on any Democratic standard bearer — let alone the powerhouse Schumer — is rare.

“I will also just say that at some point, Senator Schumer’s credibility in talking about national security issues — particularly when the facts are as they are when it relates to homeland security — have to be affected by the position that he’s taken on other issues,” Earnest said.

Earnest continued by venting about Schumer’s opposition to the White House-negotiated Iran deal that survived the Senate without his backing.

“Senator Schumer is somebody that came out and opposed the international agreement to prevent Iran from obtaining a nuclear weapon. He was wrong about that position. And most Democrats agreed — disagreed with him in taking that position,” Earnest added.

“And when people look at the facts here when it comes to funding for homeland security, they’ll recognize that he’s wrong this time, too,” he concluded, to audible astonishment from reporters.

The president’s budget includes cuts to the Urban Area Security Initiative that New York has relied on to protect against terrorism.

The funding is one way to steer anti-terror funding to cities on the top of the threat list, while other programs spread federal largesse all around the country.

The White House argues that New York is getting its fair share and then some.

“I would point out that the amount of funding that is devoted to protecting New York and making sure that law enforcement officials in New York have the resources that

they need is higher than the amount of money that’s provided to local communities across the country,” said Earnest.

“We understand that New York is the largest city in the country. We understand that New York is — certainly is a high-profile target of terrorists. That would explain precisely the kind of commitment that this administration has made to homeland security in New York.”

Schumer blasted the cuts at a press conference with the mayor and police commissioner inside Police Headquarters on Wednesday.

“These proposed cuts are ill-advised and ill-timed and they must be reversed, end of story,” Schumer said. “In light of recent attacks in Paris and San Bernardino, and the vow by our extremist enemies to launch more attacks on our shores, it makes no sense to propose cuts to vital terror prevention programs like” the urban security grants.

Bratton called the cuts “unconscionable” and “indefensible.”

The administration is proposing $330 million for urban security funding in the next fiscal year, a drop from $600 million in the current year.

Asked about Earnest’s comments, a Schumer aide responded: “We had conversations with high-ranking administration officials and didn’t receive any satisfactory responses regarding the funds.”