The NYPD is refusing to disclose information about handgun licenses held by Donald Trump and his two eldest sons, citing privacy and safety concerns, according to a new lawsuit.

A news and opinion website called the Daily Dot tried to obtain the records through a state Freedom of Information Law request in January.

But NYPD Lt. Richard Mantellino said the request was “an unwarranted invasion of personal privacy under ​the ​N​ew York Public Officers law” and “would endanger the life or safety of the applicants,” according to court papers.

So the site is suing for the information, rejecting the safety exemption because of the “round the clock Secret Service protection” provided to the president, Donald Trump Jr. and his brother Eric Trump.

“The Daily Dot and the public have a right to access public records evidencing the Trumps’ ability and need to carry handguns in one of the strictest arms licensing states in the country,” the suit says.

“The public is entitled to transparency, not secrecy, with respect to their gun license applications,” the suit says.

“Indeed, the types of licenses for which the Trumps are deemed eligible, the kinds of weapons they carry, and the underlying rationale for any request they may have made for an exception to FOIL’s public access mandate are all newsworthy concerns relevant to the public debate on guns and gun control,” the Daily Dot says in court papers.

The president has previously said he owns a .45-caliber Heckler & Koch sidearm and a .38-caliber Smith & Wesson revolver and carries a gun with him at all times.

City Law Department and NYPD reps did not immediately return requests for comment. Spokespeople for the Trumps also did not immediately return messages.