The case has pitted a defiant White House against the courts, including the Supreme Court, raising the prospect of a constitutional conflict.