Washington (CNN) The Trump administration violated the law when it decided in 2017 to phase out the Deferred Action for Childhood Arrivals program, lawyers supporting the Obama-era program told the Supreme Court on Friday.

"The Executive can change course on enforcement policies" lawyer Theodore Olson argued in new legal briefs, "but not in arbitrary and unreasoned ways."

The briefs come as the Supreme Court will hear arguments in the case on November 12. As things stand, lower courts have issued two nationwide injunctions forcing the government to continue to allow renewals in the program. DACA has become a focal point in the debate over Trump's proposed wall along the US-Mexico border and efforts to crack down on immigration. A decision siding with the administration could strip protections for nearly 700,000 so-called Dreamers in a case that will come down in the heat of next year's election.

At issue in the case is not the legality of the program that protects thousands of undocumented immigrants who came to the US as children, but how the government chose to wind it down. Olson said the government failed to "consider the costs of its decisions, including loss of work authorization for 700,000 DACA recipients."

Back in 2017, the Trump administration announced it was going to phase out DACA, which it said had been created "without proper statutory authority."

Read More