But while the government has abandoned or modified some of the immediate post-9/11 actions, they have generally withstood legal challenge. The courts have granted extraordinary deference to the executive branch when it invokes national security as grounds for its actions with long-lasting implications for the legal landscape affecting the rights of immigrants.