A New York judge on Thursday dismissed a lawsuit by President Trump’s brother Robert seeking to block publication of their niece Mary Trump’s forthcoming tell-all book.

Robert Trump filed the suit Tuesday in a Queens court, arguing the book’s publication would violate a confidentiality agreement from the settlement of the will of Fred Trump, the president and Robert’s father. The non-disclosure clause reportedly stipulated the family would not "publish any account concerning the litigation or their relationship,” unless agreed upon by all parties.

The probate court argued that it was not the proper forum to hear the case. Charles Harder, Robert Trump’s attorney, said they would refile in Manhattan.

“The court has promptly and correctly held that it lacks jurisdiction to grant the Trump family’s baseless request to suppress a book of utmost public importance and concern. We hope this decision will end the matter,” Mary Trump’s attorney Ted Boutrous said in a statement.

Courtesy Simon and Schuster

PRESIDENT TRUMP'S BROTHER TRYING TO STOP MARY TRUMP'S FAMILY TELL-ALL BOOK 

Mary Trump’s book, “Too Much and Never Enough: How My Family Created the World’s Most Dangerous Man,” is due to be published by Simon & Schuster on July 28, with a description saying she "shines a bright light on the dark history of their family in order to explain how her uncle became the man who now threatens the world’s health, economic security, and social fabric."

President Trump previously said during an interview last week that Mary Trump is "not allowed" to write the book due to the nondisclosure agreement she signed.

"She's not allowed to write a book," Trump told Axios. "You know, when we settled with her and her brother, who I do have a good relationship with — she's got a brother, Fred, who I do have a good relationship with, but when we settled, she has a total ... signed a nondisclosure."

TRUMP BLASTS BOLTON AS 'WASHED-UP CREEPSTER' AS BOOK HITS SHELVES 

In the book Mary “describes a nightmare of traumas, destructive relationships, and a tragic combination of neglect and abuse," according to the tell-all’s description on Simon & Schuster's website. "She explains how specific events and general family patterns created the damaged man who currently occupies the Oval Office, including the strange and harmful relationship between Fred Trump and his two oldest sons, Fred Jr., and Donald."

The legal battle comes just after the Trump administration has also tried to stop the publication of former national security adviser John Bolton’s memoir, “The Room Where It Happened.” The administration argued Bolton’s book contained classified information.

“Washed up Creepster John Bolton is a lowlife who should be in jail, money seized, for disseminating, for profit, highly Classified information,” Trump tweeted Tuesday. “Remember what they did to the young submarine sailor, but did nothing to Crooked Hillary. I ended up pardoning him - It wasn’t fair!”

CLICK HERE TO GET THE FOX NEWS APP

A federal judge on Saturday allowed Bolton’s memoir to be released, despite concerns it contains classified information, but tore into the former national security adviser for having “gambled” with national security.