A writ of mandamus is a mandate by a superior court to a government subordinate court to do or forebear doing a specific action that it is obliged to do or not to do under law.  In the immigration context, mandamus can be used to compel administrative agencies to act. The Mandamus Act, codified at 28 U.S.C. section 1361, authorizes the court to order a remedy.
Who may qualify as a plaintiff to file for a writ of mandamus?

A mandamus plaintiff must generally demonstrate that (1) he or she has a clear right to the relief requested; (2) the defendant has a clear duty to perform the act in question; and (3) no other adequate remedy is available. 
What remedy does the Mandamus Act provide?

Under the Mandamus Act, the court may compel a government agency (such as U.S. Citizenship and Immigration Services) to take action, although it cannot itself grant the particular relief that the petitioner seeks from the immigration agency.
How is Mandamus used in the immigration context? 

Mandamus actions may be filed in federal district court in an attempt to force an administrative agency, such as the U.S. Citizenship and Immigration Service to take an action on a case, such as to adjudicate a visa petition or naturalization application.  In some naturalization cases, an extensive delay may occur between the interview and a decision. Such extensive delays may warrant the filing of a mandamus action.
What is a Habeas Corpus Action?

A writ of habeas corpus has historically served as a means to review the legality of the detention of an individual.  The right to habeas corpus is rooted in the U.S. Constitution and the federal habeas corpus statute, 28 U.S.C. section 2241.
When can Habeas Corpus be used in the immigration context?

The most common use of habeas corpus in the immigration context is to challenge the length or conditions of immigration detentions.  Habeas may be used to address challenges not only to physical detention or restraint, but also to challenge restrictions on liberty, such as restrictions on an individual who has been released under an order of supervision. 
Mandamus and Habeas actions can be complex and are subject to rigid court procedures.  Wilson Law Group has experience in such matters, and looks forward to meeting with you for a thorough evaluation of your legal matter to develop a sound strategy.