Donald Trump reacted to the sexting scandal involving Huma Abedin, his opponent’s top aide, by saying she is “making a very wise decision” by dumping hubby Anthony Weiner — and then he accused Hillary Clinton of putting national security at risk by keeping Abedin on her staff.

“I know Anthony Weiner well, and she will be far better off without him,” the Republican presidential nominee said in a statement.

The Donald said Clinton was endangering national security by apparently keeping Abedin while she was married to the ex-congressman with a penchant for sexting anonymous women.

“I only worry for the country in that Hillary Clinton was careless and negligent in allowing Weiner to have such close proximity to highly classified information,” he continued.

“Who knows what he learned and who he told? It’s just another example of Hillary Clinton’s bad judgment. It is possible that our country and its security have been greatly compromised by this.”

Abedin announced she is dumping Weiner hours after The Post revealed his latest online dalliances.

A gallery of photos from Anthony Weiner’s latest sexting scandal: