President Donald Trump may have just dealt a blow to his own executive order.

A federal judge in Hawaii on Wednesday put a temporary nationwide restraining order on Trump's executive order restricting travel from six Muslim-majority countries. The measure was designed to stand up to legal challenges after the courts blocked an earlier version.

But Trump, who vowed to fight what he called a "terrible ruling," may not have helped his own case Wednesday night. The president called the current order a "watered down" version of the first, potentially suggesting that they had the same intent.

"This is watered-down version of the first one. This is a watered-down version," Trump said at a campaign-style rally in Tennessee. "And let me tell you something, I think we ought to go back to the first one and go all the way (through the legal system), which is wanted I wanted to do in the first place."

Norman Eisen, a top ethics lawyer for former President Barack Obama, said in a tweet that the statement was a "legal disaster." He said Trump is "digging the grave" for the order.

Norm Eisen tweet: Legal disaster--he is digging grave for the second EO and maybe the 3rd one

The executive order, which Trump argues will help to prevent terrorist attacks in the United States, made some key changes from the first version. It removed Iraq from the list of targeted countries and did not restrict legal permanent residents from entering the country — among other differences.

Trump and his advisors' public statements have resurfaced in rulings so far. The ruling Wednesday cited Trump campaign advisor Rudy Giuliani's remark that Trump wanted a way to legally implement a Muslim ban, something he proposed on the campaign trail.

It also cited policy advisor Stephen Miller's comment that the second order had the "same basic policy outcome" as the first.

The White House did not immediately respond to a request to comment on this story.