President Trump accused Gov. Andrew Cuomo and state Attorney General Letitia James of trying to “destroy” the National Rifle Association as a leadership fight inside the gun​ rights group spilled into public view at its annual convention over the weekend.

​”The NRA is under siege by Cuomo and the New York State A.G., who are illegally using the State’s legal apparatus to take down and destroy this very important organization, & others​,” Trump posted on Twitter Monday. “It must get its act together quickly, stop the internal fighting, & get back to GREATNESS – FAST!​”​

In a statement, Cuomo called gun violence a plague on the country that is killing “our children” — one that “requires true leadership.”

“President Trump: Since December 2012 there have been 2,029 mass shootings in the United States. 74,600 Americans have died from gun violence since you were elected. You have done nothing but tweet about it,” the governor said.

“Unlike you, President Trump, New York is not afraid to stand up to the NRA,” Cuomo continued. “I will continue to fight for the children of this state.”

“As for the NRA, we’ll remember them in our thoughts and prayers,” he said, using the phrase often uttered by the NRA and its allies as condolences for victims of shootings rather than gun reform measures.

James also hit back at Trump, saying her office “will follow the facts wherever they may lead.”

“We wish the President would share our respect for the law,” she said in a statement.

James announced her office was launching an investigation into the NRA’s finances​ and issued subpoenas Saturday as Oliver North announced that he would not serve a second term as the gun group’s president.

North, a former Marine Corps colonel who played a role in the Iran-Contra scandal during the Reagan administration, had been trying to remove the NRA’s longtime CEO, Wayne LaPierre.

He called for creating a committee to look into the association’s finances.

LaPierre countered by saying North was trying to oust him by threatening to release damaging information about him and the board.

James is looking into the NRA’s status as a charitable organization because it’s listed as a tax-exempt group in New York.

Last May, the NRA filed a federal lawsuit against Cuomo and the state Department of Financial Services for “blacklisting” it by discouraging banks and insurers from doing business with the organization.

With Post wires