In the month since the Supreme Court granted former President Donald J. Trump substantial immunity from prosecution, a recurring critique of the decision has emerged. Lawyers and scholars say the ruling bears a striking resemblance to Roe v. Wade, the 1973 decision establishing a constitutional right to abortion.

They point to at least four features of the immunity decision that also figured in Roe, which was overturned in 2022 as “egregiously wrong” in a slashing majority opinion from Justice Samuel A. Alito Jr.

He wrote that there was nothing in the text of the Constitution about abortion, that the majority had concocted a three-part test for enforcing the right out of whole cloth, that a revision of that three-part test had introduced a vague and unpredictable “undue burden” standard and that the ruling had removed an important question from the legislative process.

“The judicial method employed by Trump v. United States resembles Roe v. Wade in the ways that matter,” Richard D. Bernstein, who filed a supporting brief in the case on behalf of conservative critics of Mr. Trump’s legal positions, wrote in a blog post a week after the decision.

In his majority opinion in Dobbs v. Jackson Women’s Health Organization, the decision that overruled Roe, Justice Alito wrote that “the Constitution makes no express reference to a right to obtain an abortion.”

Dissenting in the immunity case, Justice Sonia Sotomayor echoed that observation. “The Constitution’s text,” she wrote, “contains no provision for immunity from criminal prosecution for former presidents.”