The National Enquirer paid the doorman of a Trump property in New York $30,000 to bottle up a story alleging Donald Trump had an illegitimate child with a female employee, a report said Thursday.

American Media Inc., which paid $150,000 to a former Playboy Playmate who claimed she’d had an affair with Trump, made the payment to Dino Sajudin in exchange for signing over the rights “in perpetuity” to a rumor he heard about Trump’s sex life, the Associated Press reported.

The contract stipulated that he would have to pay a $1 million penalty if he talked about the rumor or the deal to remain quiet.

Sajudin’s story alleged that Trump impregnated a female employee at Trump World Tower, his skyscraper near the United Nations.

The woman at the center of the story “emphatically” denied to the wire service that she had an affair with Trump.

“This is all fake,” she said.

The Associated Press said it confirmed the payment to the doorman by reviewing a confidential contract and through interviews with dozens of current and former employees of the Enquirer and American Media.

After the Trump Organization called Sajudin’s claims “completely false,” he denied making up the allegations.

“You know I took a polygraph test,” he told the Washington Post, claiming the story was killed because American Media has a history of protecting Trump from negative stories.

“It seems like the writing is on the wall about that, it’s pretty clear,” Sajudin said before referring more questions to his lawyer.

Trump’s personal lawyer, Michael Cohen, who paid porn star Stormy Daniels $130,000 just before the 2016 election to keep quiet about her alleged affair with the president a decade earlier, acknowledged he had talked with the magazine about Sajudin’s story.

But he said he did so as Trump’s spokesman and denied knowing anything beforehand about the payment.

FBI agents raided Cohen’s office, home and hotel room on Monday, seeking information about the payment to Daniels, whose real name is Stephanie Clifford.

The alleged payoff to Sajudin happened eight months before American Media, which is headed by Trump supporter David Pecker, paid $150,000 in August 2016 to Karen McDougal, a former Playboy Playmate, who alleged she had an affair with Trump.

Dylan Howard, the Enquirer’s editor-in-chief and an executive at American Media, acknowledged last year paying Sajudin but said the story ultimately was spiked because it “lacked any credibility,” the AP reported.

“Unfortunately … Dino Sajudin is one fish that swam away,” he told sister publication RadarOnline, which wrote Wednesday about a “disaffected former Trump staffer who is peddling” the allegation to other media outlets.

Sajudin refused to discuss the story with the Associated Press unless he was paid.

“If there’s no money involved with it,” he said, “I’m not getting involved.”

Common Cause, a government watchdog, ​said it ​filed complaints ​Thursday ​with the Department of Justice and the Federal Election Commission claiming that Trump and American Media violated campaign contribution rules in the $30,000 payment to Sajudin.