<s>[INST] When should a writ petition be filed in India? [/INST] A writ petition in India should be filed when a fundamental right of an individual is violatedor when there is an issue related to the violation of a legal or constitutional right. Common examples include filing a writ of habeas corpus for unlawful detentiona writ of mandamus to compel a public authority to perform its dutiesor a writ of certiorari to quash an order. </s>