NEW YORK >> A tirade of a lawsuit that Donald Trump filed Wednesday against one of his chief antagonists, the New York attorney general, was hotly opposed by several of his long-standing legal advisers, who attempted an intervention hours before it was submitted to a court.

Those opposed to the suit told the Florida attorneys who drafted it that it was frivolous and would fail, according to people with knowledge of the matter. The loudest objection came from the general counsel of Trump’s real estate business, who warned that the Floridians might be committing malpractice.

Nonetheless, the suit was filed. It accuses Attorney General Letitia James of trespassing on Trump’s right to privacy in Florida, where he lives, and seeks to halt her civil case in New York.

On Wednesday evening, Trump used his social network, Truth Social, to announce his suit and to criticize James in charged language, saying that “while James does nothing to protect New York against these violent crimes and criminals, she attacks great and upstanding businesses.”

On Thursday, a judge granted a recent request from James to stop Trump from transferring assets and to appoint a monitor to make sure that he does not.

In September, James filed her lawsuit against Trump after a three-year investigation into his business practices.