The state of Hawaii tried to throw a monkey-wrench into President Trump’s latest anti-terror travel ban — less than an hour before it was set to go into effect Thursday.

In an emergency motion filed at 1:07 p.m. local time, lawyers for the state and a Honolulu imam asked a federal judge to decide whether the ban violates terms of a US Supreme Court ruling issued Monday.

That ruling allowed elements of Trump’s second travel ban — which applies to visitors from six predominantly Muslim countries in the Middle East and Africa — to go into effect at 8 p.m. EDT, or 2 p.m. in Hawaii.

Legal papers say the Supreme Court ruling “protects any foreign national with a ‘close familial relationship’ with a person in the United States.”

But Trump’s latest ban bars a host of people “with a ‘close familial relationship’ to US persons, including grandparents and grandchildren, brothers- and sisters-in-law, fiancés, aunts, uncles, nieces, nephews, and cousins,” the papers say.

“This Court should clarify as soon as possible that the Supreme Court meant what it said, and that foreign nationals that credibly claim connections with this country cannot be denied entry under the President’s illegal Order,” according to the filing.

Hawaii — which in March won a stay of Trump’s second travel ban on grounds it discriminated against Muslims — also accused the Trump Administration of “stonewalling” for days before revealing the parameters of the new version.

Hawaii says it got official notice at 4:43 p.m. local time — along with “the transcript of a teleconference it had previously held with the media describing its plans in detail.”