Washington (CNN) The Supreme Court on Thursday upheld the race-conscious admissions program at the University of Texas, saying that the plan taking race into consideration as one factor of admission is constitutional.

The 4-3 ruling greenlights the limited use of affirmative action polices by schools.

"The Court's affirmance of the University's admissions policy today does not necessarily mean the University may rely on that same policy without refinement. It is the University's ongoing obligation to engage in constant deliberation and continued reflection regarding its admissions policies," Justice Anthony Kennedy wrote in the majority opinion.

President Barack Obama, speaking from the White House, praised the decision.

"I'm pleased that the Supreme Court upheld the basic notion that diversity is an important value in our society and this country should provide a high quality education to all our young people regardless of their background," Obama said. "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."

The 4-3 split Justices Ginsburg, Sotomayor and Kennedy against the conservatives. Justice Clarence Thomas wrote his own dissent and Chief Justice John Roberts joined Justice Samuel Alito's dissent.

"Something strange has happened since our prior decision in this case," Alito wrote in the dissent. "This is nothing less than the plea for deference that we emphatically rejected in our prior decision. Today, however, the Court inexplicably grants that request."

This is the second time the court heard the case from lead plaintiff Abigail Fisher, a white woman from Texas. In 2012, the justices issued a narrow opinion, sending the case back down to a lower court for another look. After the lower court again upheld the school program, the justices once again took up the case.

Justice Antonin Scalia sat for oral arguments in the case but died before the decision came down. Justice Elena Kagan recused herself from the case, presumably because she dealt with it in her previous job as solicitor general.

Narrow ruling, but roadmap

"Today's ruling comes as something of a surprise," said Steve Vladeck, CNN contributor and professor of law at American University Washington College of Law. "Given that Justice Kagan recused, and that the lower court had upheld the UT affirmative action plan, I think most court-watchers assumed that the justices took the case to reverse—even after Justice Scalia died. That's why, even though the decision is very narrow, it's an unexpected victory for proponents of race-conscious admissions programs."

"The decision itself is written quite narrowly, and tailored to the UT program specifically," he added. "But it's safe to assume that public universities across the country will now look at this ruling as a roadmap for how to constitutionally take race into account in admissions programs going forward."

Eight states currently have banned the use of race in admissions policies all together according to the National Conference of State Legislatures: Arizona, California, Florida, Michigan, New Hampshire, Nebraska, Oklahoma and Washington.

The case began in 2008 after Fisher was denied admission. She sued claiming the school had discriminated against her based on her race in violation of the equal protection clause. In Texas, high school seniors who graduate at the top 10% of their class are automatically admitted to the public university of their choice. On top of that program, UT also considers race and other factors for admission.

Since Fisher did not qualify for the program, she applied with other applicants -- some of whom were entitled to racial preferences. She was denied admission.

Lawyers for Fisher said in court papers that since UT already had a race-neutral plan in place the school shouldn't have layered on another program that takes race into consideration.

Fisher's case was backed by the Project on Fair Representation, a conservative group also behind a case in 2013 that invalidated a key provision of the Voting Rights Act.

Fisher did not ask the court to forbid race-conscious programs all together, but focused on the Texas plan.

Lawyers for the school argued that the Top Ten Percent Program alone wasn't enough to achieve racial diversity in the school.

They defended their admissions program arguing that it looked at each applicant as a whole person and considered race as only one factor among many in evaluating a student.

According to the University, back in 1998, before it could take race into consideration as a factor for admissions, UT had 199 African American enrollees in a class of 6,744 (3% of the incoming class). By 2008, under the race-conscious policy at issue, that number nearly doubled. For Hispanics, the numbers grew to 20% in 2008.

"UT simply seeks minority students with different backgrounds, different experiences, and different perspectives," lawyer Gregory Garre argued in court briefs.

At oral arguments in December Scalia drew controversy when he referred to an amicus brief filed in the case that suggests that affirmative action programs don't always benefit minorities.

"There are those who contend that it does not benefit African-Americans to get them into the University of Texas, where they do not do well, as opposed to having them go to a less-advanced school, a slower-track school where they do well," he said.

"One of the briefs pointed out that most of the black scientists in this country don't come from schools like the University of Texas," he said.