Legal protection of federal, state and tribal governments
In United States law, the federal government as well as state and tribal governments generally enjoy sovereign immunity, also known as governmental immunity, from lawsuits. Local governments in most jurisdictions enjoy immunity from some forms of suit, particularly in tort. The Foreign Sovereign Immunities Act provides foreign governments, including state-owned companies, with a related form of immunity—state immunity—that shields them from lawsuits except in relation to certain actions relating to commercial activity in the United States. The principle of sovereign immunity in US law was inherited from the English common law legal maxim , meaning "the king can do no wrong." In some situations, sovereign immunity may be waived by law.
Sovereign immunity falls into two categories:
Absolute immunity applies to acts that, if subject to challenge, would significantly affect the operation of government, such as would occur if a legislator could be sued for core legislative acts, and is also typically extended to statements made on the floor of the legislature. Similar protections apply to judges who are acting in a judicial capacity.
Federal sovereign immunity.
In the United States, the federal government has sovereign immunity and may not be sued unless it has waived its immunity or consented to suit. The United States as a sovereign is immune from suit unless it unequivocally consents to being sued. The United States Supreme Court in "Price v. United States" observed: "It is an axiom of our jurisprudence. The government is not liable to suit unless it consents thereto, and its liability in suit cannot be extended beyond the plain language of the statute authorizing it."
The principle was not mentioned in the original United States Constitution. The courts have recognized it both as a principle that was inherited from English common law, and as a practical, logical inference (that the government cannot be compelled by the courts because it is the power of the government that creates the courts in the first place).
The United States has waived sovereign immunity to a limited extent, mainly through the Federal Tort Claims Act, which waives the immunity if a tortious act of a federal employee causes damage, and the Tucker Act, which waives the immunity over claims arising out of contracts to which the federal government is a party. The Federal Tort Claims Act and the Tucker Act are not the broad waivers of sovereign immunity they might appear to be, as there are a number of statutory exceptions and judicially fashioned limiting doctrines applicable to both. Title 28 U.S.C. § 1331 confers federal question jurisdiction on district courts, but this statute has been held not to be a blanket waiver of sovereign immunity on the part of the federal government.
In Federal tax refund cases filed by taxpayers (as opposed to third parties) against the United States, various courts have indicated that Federal sovereign immunity is waived under subsection (a)(1) of  § 1346 in conjunction with Internal Revenue Code section 7422 (26 U.S.C. § 7422), or under section 7422 in conjunction with subsection (a) of Internal Revenue Code section 6532 (26 U.S.C. § 6532). Further, in "United States v. Williams", the U.S. Supreme Court held that in a case where an individual paid a federal tax under protest to remove a federal tax lien on her property where the tax she paid had been assessed against a third party, the waiver of sovereign immunity found in  § 1346(a)(1) authorized her tax refund suit.
Congress has also waived sovereign immunity for patent infringement claims under  § 1498(a), but that statute balances this waiver with provisions that limit the remedies available to the patent holder. The government may not be enjoined from infringing a patent, and persons performing work for the government are immune both from liability and from injunction. Any recourse must be had only against the government in the United States Court of Federal Claims. In "Advanced Software Design v. Federal Reserve Bank of St. Louis", the Federal Circuit expanded the interpretation of this protection to extend to private companies doing work not as contractors, but in which the government participates even indirectly.
Section 702 of the Administrative Procedures Act provides a broad waiver of sovereign immunity for actions taken by administrative agencies. It provides that persons suffering a legal wrong because of an agency action are entitled to judicial review.
State sovereign immunity in federal courts.
Early history and Eleventh Amendment.
In 1793, the Supreme Court held in "Chisholm v. Georgia" that of the United States Constitution, which granted diversity jurisdiction to the federal courts, allowed lawsuits "between a State and Citizens of another State" as the text reads. In 1795, the Eleventh Amendment was ratified in response to this ruling, removing federal judicial jurisdiction from lawsuits "prosecuted against one of the United States by Citizens of another State, or by Citizens or Subjects of any Foreign State". The validity and retroactivity of the Eleventh Amendment was affirmed in the 1798 case "Hollingsworth v. Virginia".
Later interpretation.
In "Hans v. Louisiana", the Supreme Court of the United States held that the Eleventh Amendment re-affirms that states possess sovereign immunity and are therefore immune from being sued in federal court without their consent. In later cases, the Supreme Court has strengthened state sovereign immunity considerably. In "Blatchford v. Native Village of Noatak", the court explained that
 ;templatestyles src="Template:Blockquote/styles.css" / ;we have understood the Eleventh Amendment to stand not so much for what it says, but for the presupposition of our constitutional structure which it confirms: that the States entered the federal system with their sovereignty intact; that the judicial authority in Article III is limited by this sovereignty, and that a State will therefore not be subject to suit in federal court unless it has consented to suit, either expressly or in the "plan of the convention." States may consent to suit, and therefore waive their Eleventh Amendment immunity by removing a case from state court to federal court. See Lapides v. Board of Regents of University System of Georgia.
(Citations omitted). In "Alden v. Maine", the Court explained that while it has
 ;templatestyles src="Template:Blockquote/styles.css" / ;sometimes referred to the States’ immunity from suit as "Eleventh Amendment immunity[,]" [that] phrase is [a] convenient shorthand but something of a misnomer, [because] the sovereign immunity of the States neither derives from nor is limited by the terms of the Eleventh Amendment. Rather, as the Constitution's structure, and its history, and the authoritative interpretations by this Court make clear, the States’ immunity from suit is a fundamental aspect of the sovereignty which the States enjoyed before the ratification of the Constitution, and which they retain today (either literally or by virtue of their admission into the Union upon an equal footing with the other States) except as altered by the plan of the Convention or certain constitutional Amendments.
Writing for the court in "Alden", Justice Anthony Kennedy argued that in view of this, and given the limited nature of congressional power delegated by the original unamended Constitution, the court could not "conclude that the specific Article I powers delegated to Congress necessarily include, by virtue of the Necessary and Proper Clause or otherwise, the incidental authority to subject the States to private suits as a means of achieving objectives otherwise within the scope of the enumerated powers." Sovereign immunity as interpreted by the Supreme Court in "Alden v. Maine" means a constitutional prohibition of suits against states by its own citizens in state courts and federal courts.
However, a "consequence of [the] Court's recognition of pre-ratification sovereignty as the source of immunity from suit is that "only" States and "arms of the State" possess immunity from suits authorized by federal law." "Northern Ins. Co. of N. Y. v. Chatham County" (emphases added). Thus, cities and municipalities lack sovereign immunity, "Jinks v. Richland County", and counties are not generally considered to have sovereign immunity, even when they "exercise a 'slice of state power.'" "Lake Country Estates, Inc. v. Tahoe Regional Planning Agency".
Separately, sovereign immunity of a state from lawsuits in other states have been in question. The Supreme Court ruled in "Nevada v. Hall" (1977) that states are not constitutionally immune from being named in lawsuits filed in other states. In the intervening years, many states developed legislation that recognize sovereign immunity of other states; since 1979, there had only been 14 legal cases that did involve a state being named as a litigant in a case heard in another state. The Supreme Court overturned "Nevada" in its 2019 decision of "Franchise Tax Board of California v. Hyatt" (Docket 17-1299) that states did enjoy constitutional sovereign immunity from lawsuits in other states.
In "Torres v. Texas Department of Public Safety" (2022), the Court ruled 5–4 that Texas was not immune from a lawsuit filed by a returning veteran under the Uniformed Services Employment and Re-employment Rights Act of 1994, which was passed to ensure enlisted personnel would be able to return to their same job or one of similar pay and placement. Texas had argued that they could not be sued under a federal law due to state sovereign immunity, but the majority found that in matters related to the nation's defense, states had given up their sovereign immunity as part of joining the union.
State actions in violation of the federal or state constitutions.
State sovereign immunity does not extend to cases where a plaintiff alleges the state's action is in violation of the federal or state constitutions. In "Department of Revenue v. Kuhnlein", the Florida Department of Revenue claimed that sovereign immunity prevented plaintiffs from bringing a case that alleged that a tax violated the Commerce Clause and, furthermore, that if the tax was unconstitutional, the refund request could not be given because it did not comply with state statutes for tax refunds. The Florida Supreme Court rejected those arguments, stating: "Sovereign immunity does not exempt the State from a challenge based on violation of the federal or state constitutions, because any other rule self-evidently would make constitutional law subservient to the State's will. Moreover, neither the common law nor a state statute can supersede a provision of the federal or state constitutions."
State statutory waiver of sovereign immunity.
After the federal government enacted the FTCA in 1946, most (but not all) states have enacted limited statutory waivers of sovereign immunity in the form of state claims acts or state tort claims acts. These laws allow plaintiffs to bring lawsuits against the state and/or its subordinate entities, but often impose various procedural prerequisites or require plaintiffs to pursue their claims in a court that specializes in hearing claims against the state government. Such laws often cap the total amount of recoverable damages and prohibit awards of certain types of damages such as punitive damages. They also authorize affirmative defenses like discretionary immunity.
In the 1961 "Muskopf v. Corning Hospital District" decision, the California Supreme Court decided that "total governmental immunity […] does not exist" and would no longer protect the state and other public entities from civil liability for their torts. The California Government Claims Act was enacted as a result.
Tribal sovereign immunity.
The federal government recognizes tribal nations as "domestic dependent nations" and has established a number of laws attempting to clarify the relationship between the federal, state, and tribal governments. Generally speaking, Native American tribes enjoy immunity from suit—in federal, state, or tribal courts—unless they consent to suit, or unless the federal government abrogates that immunity.
However, individual members of the tribe are not immune. Under certain circumstances, a tribal official acting in his or her official capacity, and within the scope of his or her statutory authority, may be cloaked with sovereign immunity. But if a tribal official's tortious acts exceed the scope of his or her authority, the official is subject to suit for those acts. See Cosentino vs. Fuller, Cal. Ct. App. (May 28, 2015).
Foreign sovereign immunity in state and federal courts.
The Foreign Sovereign Immunities Act (FSIA) of 1976 establishes the limitations as to whether a foreign sovereign nation (or its political subdivisions, agencies, or instrumentalities) may be sued in U.S. courts—federal or state. It also establishes specific procedures for service of process and attachment of property for proceedings against a Foreign State. The FSIA provides the exclusive basis and means to bring a lawsuit against a foreign sovereign in the United States. In international law, the prohibition against suing a foreign government is known as state immunity.
Local governmental immunity.
Counties and municipalities are