Updated

The U.S. Supreme Court upheld the latest version of President Trump's controversial travel ban that affects residents of some majority-Muslim countries.

The ban applies to people from Syria, Iran, Libya, Somalia and Yemen. It also placed limits on people from North Korea and Venezuela.

Since the president signed an executive order in January 2017 establishing a ban on travel of people from Muslim-majority nations, it has been a point of contention and challenged in court. Here’s a look at the ban’s journey through the legal system.

June 26 – Supreme Court upholds ban

In a 5-4 ruling, the Supreme Court issued its first substantive ruling on a Trump administration policy on June 26, upholding the travel ban. The court said the president has substantial power to regulate immigration.

Chief Justice John Roberts wrote the majority opinion, which was joined by his four conservative colleagues.

“The sole prerequisite set forth in [federal law] is that the President find that the entry of the covered aliens would be detrimental to the interests of the United States. The President has undoubtedly fulfilled that requirement here,” Roberts wrote.

Justice Sonia Sotomayor, who dissented, said "a reasonable observer would conclude that the Proclamation was motivated by anti-Muslim animus."

April 25 – Supreme Court hears oral arguments

Trump travel ban

People wait in line outside the Supreme Court in Washington, to be in the gallery when the court hears arguments over President Trump's ban on travelers from several mostly Muslim countries. (AP Photo/Jessica Gresko)

In the last case the justices will hear until October, oral arguments on the travel ban will be delivered before the Supreme Court on April 25. This is the first time the justices are considering whether it violates immigration law or the Constitution.

People waited for a seat inside the courtroom for days ahead of the hearing.

A decision is expected by June.

April 10 – Chad removed from travel ban

The Trump administration removed Chad from the travel ban because the African country had “improved its identity-management and information sharing practices” enough, press secretary Sarah Sanders said.

It had been included on the list because of an office supply glitch that prevented it from supplying homeland security officials with recent samples of its passports. It was also unable to adequately share public safety and terror-related information with U.S. officials who screen foreigners seeking to enter the country, officials said.

March 30 – More than a dozen states back lawsuit against ban

Washington, D.C. and 16 states backed Hawaii’s lawsuit against the travel ban with an amicus brief filed with the Supreme Court.

“President Trump’s discriminatory ban both hurts the families caught up in the chaos of his draconian policies, and undermines our states’ residents, institutions, businesses and economies,” New York Attorney Gen. Eric Schneiderman said in a statement.

Jan. 19 – Supreme Court announces it will rule on the travel ban

The Supreme Court announced on Jan. 19 that it will rule on Trump's controversial travel ban. The justices plan to hear arguments in April and issue a final ruling by late June.

Dec. 4 – Supreme Court OKs full enforcement of Trump travel ban

Handing the White House a huge judicial victory, the U.S. Supreme Court ruled in favor of Trump’s travel ban affecting residents of six majority-Muslim countries.

Lower courts had said people from those countries with a "bona fide" relationship with someone in the United States could not be prevented from entry.

Grandparents and cousins were among the relatives courts said could not be excluded.

Justices Ruth Bader Ginsburg and Sonia Sotomayor said they would have left the lower court orders in place.

Oct. 17 – Federal judge temporarily blocks travel ban

U.S. District Judge Derrick Watson granted a request from Hawaii to temporarily block a version of Trump's travel ban, which was supposed to take effect at midnight ET on Oct. 18.

Hawaii argued that the revised ban  which included citizens from Chad, Iran, Libya, North Korea, Somalia, Syria and Yemen, and some Venezuelan government officials and their families was a continuation of Trump's "promise to exclude Muslims from the United States."

"Today’s dangerously flawed district court order undercuts the President’s efforts to keep the American people safe and enforce minimum security standards for entry into the United States," the White House said in a statement. "The Department of Justice will vigorously defend the President’s lawful action."

Oct. 10 – Supreme Court dismisses one case

The Supreme Court didn’t take action on a case that originated in Hawaii pertaining to Trump’s travel ban and a ban on refugees.

However, it did dismiss another case that originated in Maryland. That case involved a ban that has since expired and been replaced with a new one by the administration.

Oct. 5 – Justice Department asks Supreme Court to drop travel ban case

The Department of Justice asked the nation’s highest court to dismiss the case challenging the administration’s travel ban. The administration argued the case should be dismissed because it was regarding a previous travel ban that is now moot.

Sept. 24 – Trump signs new travel ban

As Trump’s original ban was set to expire, the president unveiled new restrictions on travel to the U.S. from certain countries’ citizens.

The revised ban included citizens from Chad, Iran, Libya, North Korea, Somalia, Syria and Yemen. It also included some government officials from Venezuela.

Sept. 12 – Supreme Court lifts restrictions

The Supreme Court blocked a lower court’s decision that would have allowed refugees to enter the country under certain conditions, blocking a ruling that said a resettlement agency counts as a “bona fide relationship.”

Sept. 7 – Appeals court limits travel ban

The U.S. Court of Appeals for the Ninth Circuit upheld a lower court ruling that would allow for more refugees to enter the country despite the ban. The federal court ruled that refugees working with a resettlement agency would be considered to have established an approved “bona fide relationship” with a contact in the U.S.

WHO DOES TRUMP’S TRAVEL BAN BLOCK FROM ENTERING THE US?

It also expanded the scope of a “bona fide relationship” to include other family members, such as grandparents and other relatives.

July 19 – Supreme Court allows for strict enforcement of refugee ban

771c150a-USA-IMMIGRATION/COURT

People protest President Donald Trump's travel ban outside the U.S. Court of Appeals in Seattle. (Reuters/David Ryder)

The Supreme Court, temporarily, allowed for the administration’s travel ban to keep a strict enforcement on its ban of refugees. It did, however, leave in place the court order that made it easier for travelers from the six Muslim-majority countries to enter the U.S. and allowed a previous expansion of “bona fide relationships” to stay.

July 13 – Federal judge expands scope of travel ban

U.S. District Judge Derrick Watson, in Hawaii, ruled that a “bona fide relationship” certain travelers need before entering the U.S. could be expanded to include grandparents and other relatives.

The Justice Department filed an emergency request with the Supreme Court for clarification.

June 29 – Travel ban goes into effect

After the Supreme Court’s ruling, the Trump administration issued guidance on who would be allowed into the country and who would be barred.

June 26 – Supreme Court allows for travel ban to continue

The Supreme Court announced it would allow Trump to forge ahead with a limited version of his travel ban. Trump hailed the decision as a “victory for national security.”

HAWAII GETS CHANCE TO MAKE CASE FOR FIGHTING 3RD TRAVEL BAN

The court said it would hear arguments in October, but until then, the ban on travelers from Iran, Libya, Somalia, Sudan, Syria and Yemen could be enforced if the visitors lacked a “credible claim of a bona fide relationship with a person or entity in the United States.”

May 25 – Travel ban blocked by federal court

The Fourth Circuit Court of Appeals in Virginia blocked the travel ban from being implemented. It had begun to hear the case earlier in May.

“We remain unconvinced [the ban] has more to do with national security than it does with effectuating the President’s promised Muslim ban," the court said at the time.

March 30 – Trump administration appeals ruling

The Department of Justice filed an appeal with the Ninth U.S. Circuit Court of Appeals to challenge the ruling against the travel ban.

March 29 – Federal judge continues to block travel ban

U.S. District Judge Derrick Watson granted a request to continue to halt the travel ban.

March 16 – Another federal judge temporarily blocks the order

Sitting in Maryland, U.S. District Judge Theodore Chuang temporarily halted the executive order. The injunction was not as comprehensive as the one issued earlier in Hawaii, but it did contend that the ban was discriminatory toward Muslims.

The order did not change the previous injunction in Hawaii, but rather just reinforced it.

March 15 – Federal judge blocks travel ban

U.S. District Judge Derrick Watson prevented the travel ban from being implemented just before it was set to take effect. Watson granted the state of Hawaii’s request for a temporary restraining order.

Trump called the decision an “unprecedented judicial overreach.”

March 8 – Hawaii sues to block the travel ban

The state of Hawaii sued in an attempt to halt the Trump administration’s travel ban from going into effect. Lawyers said the “new executive order is resulting in the establishment of religion in the State of Hawaii contrary to its state Constitution.”

Lawyers also argued that the ban would damage Hawaii’s “economy, educational institutions and tourism industry; and it is subjecting a portion of the state’s citizens to second-class treatment and discrimination, while denying all Hawaii residents the benefits of an inclusive and pluralistic society.”

March 6 – Trump unveils new travel ban

Trump signed a new executive order which barred travel from six predominantly Muslim countries for 90 days – removing Iraq from the new ban.

The new order also exempted permanent residents and current visa holders from the travel ban. Syrian refugees were still included in the new order but only for 120 instead of indefinitely.

Feb. 15 – Trump’s travel ban gets a defender

Texas Attorney Ken Paxton split with other states and defended the travel ban as he filed documents with the U.S. Court of Appeals for the Ninth Circuit asking to reconsider a decision blocking the ban.

Paxton argued that the order is a legal exercise of presidential authority.

Feb. 13 – Federal judge grants injunction against ban

A federal judge in Virginia granted an injunction to prevent the administration from implementing the ban.

U.S. District Judge Leonie Brinkema said the ban was unconstitutional as it had a religious bias.

Feb. 9 – Travel ban is again blocked

The travel ban’s suspension was upheld by the U.S. Court of Appeals for the Ninth Circuit in a unanimous decision.

MUSLIM ADVOCATES, LEGAL ORG FILES SUITS OVER TRAVEL BAN

Those judges were Michelle Friedland, appointed by former President Barack Obama; Richard Clifton, appointed by former President George W. Bush; and William Canby, appointed by former President Jimmy Carter.

The court began to hear arguments from the Justice Department and lawyers from the states of Washington and Maryland – in opposition to the ban – on Feb. 7.

Feb. 6 – Justice Department asks federal court to intervene

The Justice Department filed with the U.S. Court of Appeals for the Ninth Circuit asking it to intervene and reverse a previous judge’s decision to halt the travel ban.

Sixteen attorneys general filed an amicus brief in support of the lawsuit against the travel ban. Those included: California, Connecticut, Delaware, Illinois, Iowa, Maine, Maryland, Massachusetts, New Mexico, New York, Oregon, Pennsylvania, Rhode Island, Vermont, Virginia and Washington, D.C.

Feb. 3 – Judge declines to extend injunction against travel ban

U.S. District Judge Nathaniel Gorton did not extend a temporary injunction against the administration’s travel ban.

But U.S. District Judge James Robart in Seattle did issue a temporary block of the ban on the same day.

“The state has met its burden in demonstrating immediate and irreparable injury,” Robart said as he ruled in favor of lawyers from the states of Washington and Minnesota.

Feb. 1 – Administration tweaks travel ban

The Trump administration tweaked its travel ban to exempt legal permanent residents of the U.S.

AFGHAN GIRLS ROBOTICS TEAM ARRIVES IN US JUST IN TIME

“They no longer need a waiver because if they are a legal permanent resident, they won’t need it anymore,” then-White House press secretary Sean Spicer said of green card holders.

Jan. 30 – Senate Republicans save travel ban from Democrats

Senate Republicans squashed an effort by Democrats to overturn the executive order. When Minority Leader Chuck Schumer, D-N.Y. sought a vote on legislation to reverse the ban, Sen. Tom Cotton, R-Ark., objected.

Trump also fired acting Attorney Gen. Sally Yates on this day when she refused to defend the travel ban.

Jan. 29 – Temporary stay issued on travel ban

A Boston federal court temporarily put Trump’s travel ban on hold for one week.

The ruling stipulated that previously approved refugees, valid visa holders and lawful permanent residents or travelers from the seven countries included in Trump’s order could not be detained or removed from the U.S. because of the executive order.

Jan. 28 – Federal judge issues emergency injunction against ban

A federal judge in New York issued an emergency order blocking, in part, the executive order. U.S. District Judge Ann Donnelly’s ruling temporarily barred the U.S. from deporting people who arrived with a valid visa or who had already completed a refugee application.

As dozens of people were detained after their planes landed in the U.S., massive protests erupted at airports nationwide.

Jan. 27 – Trump signs executive order barring travel from seven Muslim-majority nations

Trump signed an executive order which immediately barred entry into the U.S. for the citizens of Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen.

The order, dubbed “Protection the Nation From Foreign Terrorist Entry into the United States,” also halted the U.S. refugee program for 120 days, but indefinitely barred all Syrian refugees from entering the country.

Fox News' Barnini Chakraborty, Bill Mears and The Associated Press contributed to this report.