WASHINGTON — Donald Trump’s blustery attacks on the press, complaints about the judicial system and bold claims of presidential power collectively sketch out a constitutional worldview that shows contempt for the First Amendment, the separation of powers and the rule of law, legal experts across the political spectrum say.

Even as much of the Republican political establishment lines up behind its presumptive nominee, many conservative and libertarian legal scholars warn that electing Trump is a recipe for a constitutional crisis.

“Who knows what Donald Trump with a pen and phone would do?” asked Ilya Shapiro, a lawyer with the libertarian Cato Institute.

With five months to go before Election Day, Trump has already said he would “loosen” libel laws to make it easier to sue news organizations. He has threatened to sic federal regulators on his critics. He has encouraged rough treatment of demonstrators.

His proposal to bar Muslims from entry into the country tests the Constitution’s guarantees of religious freedom, due process and equal protection.

And, in what was a tipping point for some, he attacked Judge Gonzalo P. Curiel of U.S. District Court in San Diego, who is overseeing two class actions against Trump University.

Trump accused the judge of bias, falsely said he was Mexican and seemed to issue a threat.

“They ought to look into Judge Curiel, because what Judge Curiel is doing is a total disgrace,” Trump said. “OK? But we will come back in November. Wouldn’t that be wild if I am president and come back and do a civil case?”

David Post, a retired law professor who now writes for the Volokh Conspiracy, a conservative-leaning law blog, said those comments had crossed a line.

“This is how authoritarianism starts, with a president who does not respect the judiciary,” Post said. “You can criticize the judicial system, you can criticize individual cases, you can criticize individual judges. But the president has to be clear that the law is the law and that he enforces the law. That is his constitutional obligation.”

“If he is signaling that that is not his position, that’s a very serious constitutional problem,” Post said.

Beyond the attack on judicial independence is a broader question of Trump’s commitment to the separation of powers and to the principles of federalism enshrined in the Constitution. Randy E. Barnett, a law professor at Georgetown and an architect of the first major challenge to President Barack Obama’s health care law, said he had grave doubts on both fronts.

“You would like a president with some idea about constitutional limits on presidential powers, on congressional powers, on federal powers,” Barnett said, “and I doubt he has any awareness of such limits.”

Republican leaders say they are confident that Trump would respect the rule of law if elected.

“He’ll have a White House counsel,” Sen. Mitch McConnell of Kentucky, the majority leader, told Hugh Hewitt, the radio host, on Monday. “There will be others who point out there’s certain things you can do and you can’t do.”

Sen. John McCain, R-Ariz., who has become a reluctant supporter of Trump, said he did not believe that the nation would be in danger under his presidency.

“I still believe we have the institutions of government that would restrain someone who seeks to exceed their constitutional obligations,” McCain said. “We have a Congress. We have the Supreme Court. We’re not Romania.”

“Our institutions, including the press, are still strong enough to prevent” unconstitutional acts, he said.

Post said that view was too sanguine, given the executive branch’s practical primacy. “The president has all the power with respect to enforcing the law,” he said. “There’s only one of those three branches that actually has the guns in its hands, and that’s the executive.”

Republican officials have criticized Obama for what they have called his unconstitutional expansion of executive power. But some legal scholars who share that view say the problem under a President Trump would be worse.

“I don’t think he cares about separation of powers at all,” said Richard Epstein, a fellow at the Hoover Institution who also teaches at New York University and the University of Chicago.

President George W. Bush “often went beyond what he should have done,” Epstein said. “I think Obama’s been much worse on that issue pretty consistently, and his underlings have been even more so. But I think Trump doesn’t even think there’s an issue to worry about. He just simply says whatever I want to do I will do.”

Trump has boasted that he will use Obama’s actions as precedent for his own expansive assertions of executive power.

“He’s led the way, to be honest with you,” he said in January on “Meet the Press,” referring to Obama’s program to spare millions of immigrants in the country unlawfully from deportation. “But I’m going to use them much better, and they’re going to serve a much better purpose than what he’s done.”

But Post said there was a difference between Obama’s view of executive power and that of Trump. “Whatever you think of Obama’s position on immigration, he is willing to submit to the courts,” he said. “There is no suggestion that he will disobey if the courts rule against him.”

Several law professors said they were less sure about Trump, citing the actions of another populist, President Andrew Jackson, who refused to enforce an 1832 Supreme Court decision arising from a clash between Georgia and the Cherokee Nation.

“I can easily see a situation in which he would take the Andrew Jackson line,” Epstein said, referring to a probably apocryphal comment attributed to Jackson about Chief Justice John Marshall: “John Marshall has made his decision; now let him enforce it.”

There are other precedents, said John C. Yoo, a law professor at the University of California, Berkeley, who took an expansive view of executive power as a lawyer in the Bush administration.

“The only two other presidents I can think of who were so hostile to judges on an individual level and to the judiciary as a whole would be Thomas Jefferson and Franklin Roosevelt,” he said.

Both of those presidents chafed at what they saw as excessive judicial power.

“But they weren’t doing it because they had cases before those judges as individuals,” Yoo said. “They had legitimate separation-of-powers fights between the presidency and the judiciary. Trump is lashing out because he has a lawsuit in a private capacity, which is much more disturbing.”

Other legal scholars said they were worried about Trump’s commitment to the First Amendment. He has taken particular aim at The Washington Post and its owner, Jeff Bezos, the founder of Amazon.

“He owns Amazon,” Trump said in February. “He wants political influence so Amazon will benefit from it. That’s not right. And believe me, if I become president, oh do they have problems. They’re going to have such problems.”

More generally, Trump has discussed revising libel laws to make it easier to sue over critical coverage.

“I’m going to open up our libel laws so when they write purposely negative and horrible and false articles, we can sue them and win lots of money,” Trump said in February. “We’re going to open up those libel laws. So when The New York Times writes a hit piece which is a total disgrace or when The Washington Post, which is there for other reasons, writes a hit piece, we can sue them and win money instead of having no chance of winning because they’re totally protected.”

On one hand, Trump seemed to misunderstand the scope of presidential power. Libel is a state-law tort constrained by First Amendment principles, and a president’s views do not figure in its application.

On the other hand, said Ilya Somin, a law professor at George Mason University, Trump’s comments betrayed a troubling disregard for free expression.

“There are very few serious constitutional thinkers who believe public figures should be able to use libel as indiscriminately as Trump seems to think they should,” Somin said. “He poses a serious threat to the press and the First Amendment.”

Many of Trump’s statements about legal issues were extemporaneous and resist conventional legal analysis. Some seemed to betray ignorance of fundamental legal concepts, as when he said in a debate that Sen. Ted Cruz of Texas had criticized Trump’s sister, a federal appeals court judge, “for signing a certain bill,” adding for good measure that Justice Samuel A. Alito Jr., while still an appeals court judge, had also “signed that bill.”

But bills are legislative rather than judicial documents. And, as it happened, Alito had not joined the opinion in question.

Asked on “Good Morning America” in March about whom he would name to the Supreme Court, Trump said he would “probably appoint people that would look very seriously at” Hillary Clinton’s “email disaster because it’s criminal activity.” In the constitutional structure, however, Supreme Court justices are neither investigators nor prosecutors.

When Trump recently released a list of his potential Supreme Court nominees, conservative and libertarian scholars were heartened, but only to a point.

“It was a tremendous list, a great list,” said Shapiro, from the Cato Institute. “Who knows how much you can trust the list?”