A top Senate appropriator has ordered Attorney General Loretta Lynch to limit federal police grants to states and municipalities that refuse to follow federal immigration laws.

The move, by Senate Commerce, Justice and Science Appropriations subcommittee Chairman Richard Shelby, R-Ala., takes a direct swipe at so-called sanctuary cities that ignore federal immigration laws and release criminal illegal immigrants even if federal law enforcement officials want them deported.

Shelby wants Lynch to implement a certification process for all Justice Department grants "from this point forward," under a rule that allows the department to place stipulations on the grant money.

Shelby's letter comes after Francisco Sanchez, 45, was charged with shooting Kathryn Steinle, 32, on a San Francisco pier last week. Law enforcement there, following "sanctuary city" rules, released Sanchez, an illegal immigrant, even though the federal immigration officials wanted him detained for later deportation.

"Simply put, municipalities that refuse to cooperate with federal immigration laws should not receive the Department of Justice's federal law enforcement assistance funding," Shelby wrote to Lynch.

While Shelby may not be able to dictate how Lynch runs the Department, he holds the purse strings from his perch on Senate Appropriations.

Shelby pointed out that his panel awarded the department $2 billion for grants to distribute to state and local law enforcement agencies and the community policing program known as COPS. Shelby concluded the letter with a cryptic hint that he might take "no" for an answer.

"I look forward to hearing back from you on how you plan to expeditiously address the reckless policies of these 'sanctuary cities' and working with you on this issue in the fiscal year 2015, fiscal year 2016 and beyond," Shelby wrote.

Sen. Rand Paul, R-Ky., has introduced legislation that would take away federal funding from cities that don't comply with federal immigration laws.

"This must end and it must end now," Paul said. "My bill makes it clear, the American people will not stand for cities harboring violent criminals."