If a lawsuit is filed in state court, the defendant may remove the lawsuit to federal court if there is a basis for the federal court to have jurisdiction over the lawsuit—either because the plaintiff has alleged a violation of federal law (the U.S. Constitution, a federal statute, or a treaty to which the United States is a party), or because there is complete diversity of citizenship between the parties—meaning no plaintiff is a citizen of the same state as any defendant—whether the parties are persons or entities.
In California, as in other states, a defendant has the right to remove a lawsuit from state court to federal court under certain conditions. This process is governed by federal law, specifically 28 U.S.C. § 1441. Removal is possible if the case involves a federal question, meaning the plaintiff's claim is based on the U.S. Constitution, federal statutes, or treaties. Additionally, a case can be removed based on diversity jurisdiction, which requires that all plaintiffs have a different state citizenship from all defendants, and the amount in controversy exceeds $75,000. It's important to note that the defendant must file for removal within 30 days of receiving the initial pleading or summons, and the case must be removed to the federal district court that encompasses the state court where the action was originally filed. If the federal court later finds that it lacks jurisdiction, it can remand the case back to state court.