Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A federal judge in Hawaii on Thursday ruled that the U.S. government cannot apply a key part of President Donald Trump’s so-called "travel ban" to bar entry of grandparents and some other relatives of people legally in the country.

U.S. District Court Judge Derrick Watson wrote in a ruling that the government’s interpretation of those qualifying for an exemption to the travel restrictions is too narrow.

"The Government’s definition represents the antithesis of common sense," Watson said in his ruling. "Common sense, for instance, dictates that close family members be defined to include grandparents."

Watson ruled the government cannot use a main provision of the travel ban to exclude "grandparents, grandchildren, brothers-in-law, sisters-in-law, aunts, uncles, nieces, nephews, and cousins of persons in the United States."

Attorney General Jeff Sessions said in a statement on Friday that the Justice Department will take the matter directly to the Supreme Court.

“The district court has issued decisions that are entrusted to the Executive Branch, undermined national security, delayed necessary action, created confusion, and violated a proper respect for separation of powers," Sessions said in a statement. "The Supreme Court has had to correct this lower court once, and we will now reluctantly return directly to the Supreme Court to again vindicate the rule of law and the Executive Branch's duty to protect the nation."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The State Department had said grandparents and others did not count as close familial relationships following a Supreme Court ruling last month that allowed part of the Trump's executive order to take effect.

At issue is Trump’s second, revised executive order, which restricts entry to the United States for 90 days of those from six predominantly Muslim nations — Iran, Sudan, Syria, Libya, Somalia, and Yemen — while the government reviews its vetting program.

Unlike the initial executive order, which was blocked by a federal judge, the second one does not apply to anyone who has already obtained a valid visa.

The U.S. Supreme Court in allowing part of Trump’s revised executive order to take effect ruled that it could not be applied to those "who have a credible claim of a bona fide relationship with a person or entity in the United States."

Hawaii Attorney General Douglas Chin speaks at a news conference about Hawaii's lawsuit challenging President Donald Trump's travel ban on June 30, 2017 in Honolulu. Caleb Jones / AP File

The U.S. State Department then defined those relationships as including parents, spouses, fiancés, children, adult sons or daughters, son- and daughters-in-law, and siblings. But it said grandparents, aunts, uncles, cousins, nieces, nephews and siblings-in-law did not count as a close familial relationship and they would be subject to the ban.

Hawaii, joined by 15 other states and the District of Columbia, argued that the Trump administration wrongly excluded grandparents and other family members. Watson agreed in a his ruling Thursday that the government’s list was too narrow.

"When appropriately considered in the context of the June 26 [Supreme Court] order, the Government's narrowly defined list finds no support in the careful language of the Supreme Court or even in the immigration statutes on which the Government relies," Watson wrote in the ruling.

Neal Katyal, one of the attorneys representing Hawaii in the case, on Twitter called Watson's decision a "sweeping victory" and said it means "the narrow Trump Admin definition of family is wrong."

Watson also ruled Thursday that the executive order could not be used to bar refugees with formal assurances of placement services by United States resettlement agencies.

Trump’s executive order suspends for 120 days entry to the United States of refugees.

Critics have called Trump's executive order a "Muslim ban." Trump and the White House have said it is necessary to protect Americans from terrorism.

The Supreme Court has agreed to take up appeals from the government of lower court decisions that blocked implementation of Trump's executive order during its next session.