(Reuters) - A U.S. federal judge in Virginia ruled on Friday that President Donald Trump’s travel ban was justified, increasing the likelihood the measure will go before the Supreme Court as the decision took an opposing view to courts in Maryland and Hawaii that have halted the order.

FILE PHOTO - Immigration activists, including members of the DC Justice for Muslims Coalition, rally against the Trump administration's new ban against travelers from six Muslim-majority nations, outside of the U.S. Customs and Border Protection headquarters in Washington, U.S. on March 7, 2017. REUTERS/Eric Thayer/File Photo

U.S. District Court Judge Anthony Trenga rejected arguments by Muslim plaintiffs who claimed Trump’s March 6 executive order temporarily banning the entry of all refugees and travelers from six Muslim-majority countries was discriminatory.

The decision went against two previous court rulings that put an emergency halt to the order before it was set to take effect on March 16. The order remains halted.

Trump has said he plans to appeal those unfavorable rulings to the U.S. Supreme Court if needed, and differing opinions by lower courts give more grounds for the highest court to take up the case.

Trenga, an appointee of Republican President George W. Bush, said the complaint backed by the Council on American-Islamic Relations (CAIR), a Muslim civil rights group, found that more than 20 individuals who brought the suit had been able to show they were harmed by the travel ban since they might be unable to reunite with their relatives.

But he also ruled that Trump’s revised order, which replaced a more sweeping version signed on Jan. 27 and rejected by courts, fell within the president’s authority to make decisions about immigration.

He said that since the order did not mention religion, the court could not look behind it at Trump’s statements about a “Muslim ban” to determine what was in the “drafter’s heart of hearts.”

Trump has said the ban is necessary to protect the country from terrorist attacks, but his first order was halted by a federal judge in Seattle and a U.S. appeals court in San Francisco due to concerns it violated the U.S. Constitution’s prohibition against religious bias.

“We’re confident that the president’s fully lawful and necessary action will ultimately be allowed to move forward through the rest of the court systems,” said White House Press Secretary Sean Spicer at a briefing.

CAIR said it would appeal the decision to the 4th U.S. Circuit Court of Appeals. Lena Masri, CAIR’s national litigation director, said the 4th Circuit and the Supreme Court “are the judicial bodies that will ultimately decide whether the Constitution protects the rights of Muslim Americans.”

OTHER COURT ACTION

A ruling by U.S. District Judge Derrick Watson in Hawaii - an appointee of Democratic President Barack Obama - put a stop to the two central sections of the revised ban that blocked travelers from six countries and refugees, while leaving other parts of the order in place.

U.S. District Judge Theodore Chuang in Maryland, also an Obama appointee, only put a halt to the section on travelers.

The Virginia lawsuit sought to strike down the revised ban in its entirety.

Watson scheduled a hearing for Wednesday to decide whether his temporary order blocking the travel and refugee restrictions should be converted into a more formal preliminary injunction. The Justice Department has said it would oppose that bid.

The government has appealed Chuang’s decision in Maryland, also to the 4th circuit, and a hearing in that case is scheduled for May 8.

Other lawsuits against the ban continue to move forward around the country. Also on Friday, the Southern Poverty Law Center and other groups filed a new complaint in U.S. District Court in Washington D.C. on behalf of Muslim community organizations.