David A. Martin, a professor of law at the University of Virginia, served as general counsel of the Immigration and Naturalization Service from 1995 to 1998 and principal deputy general counsel of the Department of Homeland Security from 2009 through 2010.

President Obama recently announced a policy to stop deportation of most undocumented immigrants who came here as children and to give them a quasi-status, called deferred action, that can let them work legally. Perhaps 800,000 Dreamers (as these young migrants are known, because they would be covered under most versions of the long-stalled Dream Act) will benefit.

Pundits have been quick to label this initiative a kind of presidential penance for alienating Latino supporters through his alleged policy of “record deportations.” Others say the new initiative is lawless, defying or nullifying statutes Congress has passed.

Both camps are wrong. In fact, the Dreamer policy was largely made possible, both politically and legally, by the administration’s resolute, focused deportation policy. Immigrant advocacy groups should begin appreciating this balanced accomplishment.

Since Obama’s inauguration, advocates have pressured the president to trim way back on deportations, in the name of prosecutorial discretion. Some even suggested that U.S. Immigration and Customs Enforcement (ICE) should deport only people with serious felony convictions, which would cut removals to no more than half — and probably more like a quarter — of the 397,000 ICE enforced in 2011.

But prosecutorial discretion, contrary to advocates’ apparent assumption, isn’t authority to negate whole realms of enacted law. It is authority to choose strategies and to direct resources while still achieving the basic aims of the relevant legislation.

The policy that calls for high-volume deportations is not only, or even primarily, Obama’s. It is Congress’s policy, expressed both through the substantive immigration laws and — importantly — through annual appropriations acts. Appropriators have showered the enforcement agencies with resources over the past two decades. For the past four years, those resources have been enough to support 370,000 to 400,000 ICE removals a year. Enacted appropriations have the force of law. (Incidentally, Obama’s removal level is only slightly higher than the last year of the Bush administration. He may hold a record, but it’s by only 2 percent.)

Congress has also grown increasingly specific in its enforcement mandates — for example, not only funding more than 30,000 ICE detention beds but firmly directing that they be in constant use for removals. Appropriations legislation has also specified the creation of a data system, now known as Secure Communities, permitting ICE to link seamlessly to state and local arrest information in order to concentrate efficiently on removing people with criminal records.

For Obama to drop enforcement way below the levels Congress has called for through appropriations laws would be more than legally dubious. It would also set a dangerous precedent that could haunt progressives. Picture a Romney administration thwarting, say, the new consumer protection laws by refusing to spend half the money Congress continually provides for their enforcement. Such hypothetical actions, by any administration, would conjure the ghost of Richard Nixon, who belligerently impounded huge sums that Congress had appropriated simply because enforcement didn’t conform to unilateral executive policies.

Hard-liners may say: But Obama is not enforcing the law; he is rewriting it through his latest initiative. This, too, is incorrect, precisely because the administration has pledged to stay at the level of removals that corresponds to appropriations, even while keeping Dreamers off the deportation list. Its three-year track record of high-volume deportations, maintained in the face of sharp criticism from key supporters, shows its commitment to law-bound enforcement.

Some might still object: How can Obama give these people work authorization? But such an approach is no novelty, and it certainly is not lawless. Foreigners given deferred action have been eligible for work permits for 25 years under regulations — carrying the force of law — adopted during the Reagan administration.

Because ICE’s annual appropriations, vast as they have become, still allow for removal of only about 4 percent of the estimated undocumented population, enforcement is inevitably quite selective. Hard-liners are only bluffing when they posture about across-the-board enforcement rigor. In reality, they are essentially asking for random removals — just charge whomever a field agent happens to stumble across, until that month’s resources run out. How can that make for effective policy?

Instead, ICE is systematically applying the kind of judgment and discretion that properly belong to the executive, in order to adjust the focus of enforcement within the bounds that Congress marks. This approach began with a prosecutorial discretion guidance memo from ICE Director John Morton in June 2011. Although its implementation is still uneven, ICE is turning the removal spotlight toward criminals, recent arrivals and repeat immigration violators — and away from youths who are not culpable for their illegal presence. The Dreamer policy is simply a more detailed element of that broader effort.

Our country’s best chance for a long-run cure to our sick immigration system is to combine sophisticated enforcement with humane realism about its targets. Polling suggests that this precise mix is winning support for Obama’s Dreamer policy. May it someday be a model for full legislative reform.