LOS ANGELES—The Trump administration is expanding its immigration dispute with local officials across the country, warning 29 additional city, county and state governments that they may be violating a law requiring them to share certain immigration information with federal authorities.

The notice, issued in letters to local officials from Vermont to Oregon this week, tells governments that they must comply with the information-sharing rule to receive a federal grant, and says they have until Dec. 8 to prove compliance.

The warning comes despite repeated rulings from federal courts that so far prohibit the Trump administration from pulling funding over local immigration directives. Known as sanctuary policies, the directives vary from place to place, but generally protect undocumented immigrants from federal enforcement.

The Trump administration has been battling local governments over the issue for months, pushing cities and states to alert federal officials to illegal immigrants in local jails before they are released.

Some of the cities and states on the list say they already share that information with federal officials, but have other policies in place that benefit and protect undocumented immigrants.