CHICAGO — Chicago has asked a federal judge to halt President Donald Trump’s policy of withholding public safety grants from so-called sanctuary cities.

The request was filed late Thursday as part of Chicago’s lawsuit challenging the policy, which targets cities that don’t fully cooperate with stricter enforcement of U.S. immigration law.

A preliminary injunction, if granted, could freeze the safety-grants policy at least until the litigation plays out.

The city requested a ruling by Sept. 5. It says U.S. Attorney General Jeff Sessions has set unconstitutional conditions for cities to qualify for grants, including that they give federal agents unfettered access to detention facilities.

Chicago filed the lawsuit this week. In response, Sessions said the Trump administration won’t “simply give away grant dollars” to cities “that proudly violate the rule of law.”