Editor's note: This story has been updated throughout.

In a major — and surprising — win for affirmative action supporters, the U.S. Supreme Court has upheld the University of Texas at Austin’s right to give a slight boost to black and Hispanic applicants.

The 4-3 decision rejected Sugar Land native Abigail Fisher’s claim that she was unfairly discriminated against because she was white. She was denied admission into UT-Austin in 2008 but argued in a lawsuit that minority students who were less qualified got in over her. UT-Austin has defended its practice, saying its narrow consideration of race stood up to legal scrutiny.

The majority opinion was authored by Justice Anthony Kennedy, who has been critical of affirmative action in the past. His decision to preserve UT-Austin's system was narrow and not without caveats, but it keeps affirmative action legal nationwide for now.

Read More The Price of Admission: A Series on the Fight Over the Top 10 Percent Rule

Supporters of boosting chances for minority students immediately praised the ruling. President Barack Obama said he was "pleased" the high court upheld "the basic notion that diversity is an important value in our society."

"We are not a country that guarantees equal outcomes, but we do strive to provide an equal shot to everybody, and that's what was upheld today," he said.

Hillary Clinton, the presumptive Democratic nominee for president, called the case “a win for all Americans.”

“It means that universities can continue to make diversity and inclusion central goals of their admissions processes, and means our college campuses will continue to be places where young adults of all backgrounds can learn from each other,” she said in a statement.

Opponents, meanwhile, decried the decision as support for an unfair and discriminatory admissions system.

"Today’s decision is a sad step backward for the original, colorblind principles to our civil rights laws," said Edward Blum, the conservative activist who recruited Fisher to sue UT-Austin over its admissions policy.

Under the legal framework upheld Thursday, universities are required to meet several legal tests to use affirmative action. They have to prove that the consideration of applicants’ race serves an educational benefit. And they have to show that there are no “race-neutral” ways of achieving that goal.

Fisher claimed that UT-Austin failed to meet those expectations, arguing that the state’s “race neutral” Top 10 Percent Rule does a sufficient job of creating diversity at the university. The rule guarantees admission to any public university in the state to students near the top of their high school's graduating class. Its goal is to level the playing field for applicants from inner-city, minority-dominated high schools with those of kids who graduate from wealthy schools where most students are white and students tend to do better on standardized tests.

Three-quarters of the students UT-Austin admits each year are supposed to be automatically admitted. The rest are selected through a “holistic review,” and that portion is the group for which affirmative action applies.

Fisher argued that the Top 10 Percent Rule was so effective that it made affirmative action unnecessary for the other pool of applicants. Kennedy did not rule on that point, but he noted that at the time of the lawsuit, UT-Austin's use of affirmative action had “been in effect for only three years,” meaning the university didn’t have time to study its effects.

“The University, however, does have a continuing obligation to satisfy the strict scrutiny burden: by periodically reassessing the admission program’s constitutionality, and efficacy, in light of the school’s experience and the data it has gathered since adopting its admissions plan.”

In an impassioned minority dissent, Justice Samuel Alito argued that UT-Austin is using affirmative action simply because it wants to admit rich minorities. He said UT-Austin’s rationale for needing to consider race is based on the assumption that black and Hispanic student admitted under the Top 10 Percent Rule are only getting in because they are from lower-performing schools.

“UT’s assumptions appear to be based on the pernicious stereotype that the African-Americans and Hispanics admitted through the Top Ten Percent Plan only got in because they did not have to compete against very many whites and Asian-Americans,” Alito wrote.

He added, “When affirmative action was first adopted, it was for the purpose of helping the disadvantaged ... Now we are told that a program that tends to admit poor and disadvantaged minority students is inadequate because it does not work to the advantage of those who are more fortunate. This is affirmative action gone wild.”

UT-Austin President Greg Fenves said he was "thrilled and gratified" by the Supreme Court's majority decision.

"Our pursuit of excellence is grounded in the university’s public mission to provide the highest quality education for every student," Fenves said in a statement. "Diversity is essential to carry out that mission. The educational benefits of diversity for all students enhance The University of Texas at Austin, the higher education community, and the nation."

The majority opinion's language did seem to leave open future challenges to UT-Austin’s system, though the Fisher case in particular appears to be over.

Future challenges could face a tougher audience in the Supreme Court, however. Justice Elena Kagan, a liberal-leaning judge, recused herself from the Fisher case because she worked on it while she was solicitor general. And there is a vacancy on the court that could soon be filled. Conservative Justice Antonin Scalia, who died this year, participated in oral arguments in the case. If he hadn't passed away, he almost certainly would have been able to prevent this ruling.

Most other public universities in Texas will be unaffected by the ruling. Only UT-Austin and Midwestern State University consider their applicants’ races, according to annual reports produced by all the schools. Texas A&M University, for example, works to increase diversity through recruiting and financial aid.

In a statement, Fisher said she was disappointed by the ruling, saying it allows UT-Austin to treat students differently because of their race.

“I hope that the nation will one day move beyond affirmative action,” she said.

Texas Attorney General Ken Paxton expressed disappointment in the justices' decision, saying in a statement "the opportunities [UT-Austin] offers should be available to all students based on their merit, not the color of their skin."

Paxton's statement noted that he "did not represent the University before the Supreme Court." But his predecessor, now-Gov. Greg Abbott, did submit a brief supporting UT-Austin's use of race in admissions back in 2011.

"Those who drafted and ratified the Fourteenth Amendment did not establish the principle of 'colorblind' government that opponents of race-conscious admissions too often invoke," Abbott wrote to the Fifth Circuit Court of Appeals.

Abbott's office declined to comment for this story.

Read more about the history of the fight over boosting diversity at Texas universities.

The Texas Tribune collaborated with Reveal on a deeper look at the Top 10 Percent Rule and race in admissions at UT-Austin. Listen to our podcast here.

Disclosure: The University of Texas at Austin has been a financial supporter of The Texas Tribune. A complete list of Tribune donors and sponsors can be viewed here.

Neena Satija and Isabelle Taft contributed to this report.