PHOTO: By CNBC.com

A New York judge on Tuesday temporarily blocked the publication of an unflattering tell-all book written by President Trump's niece that is set to publish in July.

Iran PressAmerica: The ruling, issued by Judge Hal B. Greenwald of the New York State Supreme Court, is the first legal win for Robert S. Trump, the younger brother of the President. Robert Trump has sought to block the book by Mary Trump, the President's niece, contending it violates a confidentiality agreement related to the estate of the President's father, Fred Trump.

"Robert Trump is very pleased with the New York Supreme Court's injunction against Mary Trump and Simon & Schuster," Charles Harder, Robert Trump's attorney, said in a statement.

Calling the actions of Mary Trump and Simon & Schuster "reprehensible," Harder added that he looked forward to "vigorously litigating this case."

"Short of corrective action to immediately cease their egregious conduct, we will pursue this case to the very end," Harder said.

In addition to his work for Robert Trump, Harder has a history of filing lawsuits against news organizations on behalf of President Trump. The lawsuits have been dismissed by legal experts as public relations stunts with little chance of success in court.

Ted Boutrous, a renowned First Amendment attorney who represents Mary Trump, and who has also represented CNN on matters in the past, said the order "flatly violates the First Amendment."

"We will immediately appeal," Boutrous said. "This book, which addresses matters of great public concern and importance about a sitting president in election year, should not be suppressed even for one day."

Adam Rothberg, a spokesperson for Simon & Schuster, said in a statement that the company was "disappointed" in the court's decision.