The words had hardly left his mouth when the Republican governor Jan Brewer passed the law in Arizona, in direct defiance of his wishes.
By so doing she and the GOP may have fallen into a well laid trap.
The measure is so extreme, stopping and searching people on sight and demanding identification, that most Americans will see it as deeply unfair and in direct contrast to our cherished freedoms.
It will also drive almost every Latino in America into the hands of the Democratic Party.
By framing the issue with such an extreme law, President Obama has ensured that the Arizona legislation becomes ground zero for the great debate ahead.
Republicans will know that it loses them the Hispanic vote, not just in Arizona but all over the country.
They have painted a target on their own back by allowing such draconian legislation to pass.
President Obama has played a trump card by using the power of the bully pulpit and ensuring that Americans far and wide hear about the legislation just passed.
While Americans are uneasy about illegal immigration, they cherish their own freedoms even more. Stop and search tactics will strike them as a far too extreme a response to the problem.
And Democrats stand to gain as a result -- they may even get a reform bill through Congress.