WASHINGTON — Attorney General Jeff Sessions sued California this week for not doing enough to find and punish unauthorized immigrants, and said on Wednesday he was girding for an epic battle.

“California is using every power it has — and some it doesn’t — to frustrate federal law enforcement,” he said in a speech in Sacramento. “So you can be sure I’m going to use every power I have to stop them.”

One of the weapons Mr. Sessions is counting on is a 2012 Supreme Court ruling siding with the Obama administration, which had sued Arizona for violating federal immigration laws. But in that case Mr. Obama’s lawyers accused the state of going too far in trying to find and punish unauthorized immigrants.

“The state may not pursue policies that undermine federal law,” Justice Anthony M. Kennedy wrote for the majority.