WASHINGTON (AP) — President Barack Obama's lawyers are carefully crafting a legal rationale for executive actions on immigration as a self-imposed, end-of-summer deadline to act approaches.

Whatever Obama does will face intense opposition and potential legal challenges, so lawyers are working on a plan that they believe will withstand scrutiny.

The argument goes something like this: Beyond failing to fix broken immigration laws, Congress hasn't even provided the government with enough resources to fully enforce existing laws. With far more immigrants in the U.S. illegally than the government could reasonably deport, the White House believes it has wide latitude to prioritize which individuals should be sent home.

But Republicans, too, are exploring their legal options for stopping Obama from what they've deemed egregious presidential overreaching.