A question that immigration attorneys hear quite often is whether a person who is seeking permanent residence through their U.S. citizen spouse must leave the U.S. to complete the process. As a general rule, you must be able to demonstrate a lawful entry in order to gain permanent residence without leaving the country. The most common example is that the person entered with some type of visa (excluding crewmen). In some cases, even if the visa is expired, the person could still adjust their status to that of a lawful permanent resident because they can show a lawful entry.
As with any rule, there are exceptions to the rule. If the person can show that they filed or had one of the following petitions filed on their behalf or a family member's behalf on or before April 31, 2011, then they can pay a $1,000 fine and adjust in the U.S. witout a lawful entry. (As a side note, persons without a lawful entry could also take a longer route to permanent residence through the Violence Against Women Act or through the U visa for victims of serious crimes or domestic violence.)
If you are in the unfortunate situation of having to leave the U.S. to complete the residence application process at a U.S. Consulate, be sure to consult with an attorney about the process and any waivers that may be required. The most common waiver that is required is the Extreme Hardship Waiver to overcome the 3 or 10 year bars to reentry. Extreme Hardship Waivers are quite demanding in terms of evidence, but they are not impossible.