Affirmative-action policies, which have provided a leg up in admissions to black and Latino students at selective colleges for almost 50 years, are in deep trouble. On Wednesday, when the U.S. Supreme Court hears oral arguments in Fisher v. University of Texas II challenging affirmative-action policies, it is very likely that a majority of justices will lay the groundwork for a decision striking down UT Austin’s use of racial preferences.

Paradoxically, however, the conservative justices who do so could spur the creation of a new, more liberal set of affirmative-action policies at selective colleges across the country. These policies may actually create robust racial diversity by helping economically disadvantaged students of all races.

Today’s debate isn’t so much about whether racial and ethnic diversity is an important and desirable goal. Most people of good will agree that it is. The debate, instead, has shifted to the questions of how universities achieve diversity—the key issue in Fisher II.

The U.S. Supreme Court has properly recognized that racial diversity on campus is desirable, and that is unlikely to change in the current litigation. Classroom discussions are more engaging when students bring different life experiences to the table. And the court has held that the “path to leadership” should be open to students of all backgrounds. The researcher Thomas Dye has found that 50 percent of government leaders and 49 percent of corporate leaders are graduates of just 12 wealthy colleges and universities, so it’s important that bright students from all walks of life have access to selective higher-education institutions.

But the Supreme Court has also long held that the Equal Protection Clause of the Fourteenth Amendment disfavors government practices (like admissions policies at public universities) that explicitly treat people differently based on which racial box they check. The same principle is embodied in Title VI of the 1964 Civil Rights Act, which applies to all universities (including private institutions) that receive public funding. Universities, the courts have held, can only use race when it is “necessary” to promote diversity.

The swing vote on the Supreme Court, Justice Anthony Kennedy, has been very skeptical that racial preferences are always required to produce racial diversity on campus. He has long sought to push universities to pursue alternative means to achieve diversity—such as giving a preference to economically disadvantaged students of all races, or admitting the top proportion of students from all high schools in a state.

Given Kennedy’s legal stance, affirmative-action policies at selective colleges are very vulnerable. Universities generally don’t use race as a last resort, and they weigh it very heavily in admissions decisions. Rather than reaching out to economically disadvantaged students of all races, today’s affirmative-action policies explicitly look at race and tend to advantage fairly well-off African American and Latino students to sit alongside their well-off white and Asian peers.

In the early days, affirmative action properly helped the young Sonia Sotomayor, who grew up in public housing, and the young Michelle Obama, whose parents did not go to college. But over time, the programs morphed into something very different. By the 1990s, one study found that 86 percent of African American students on selective campuses were middle or upper class, and the white students were even richer.

Underrepresented minority students receive a 28-percentage-point increase in their chances of being admitted, according to one careful analysis. By contrast, the study found low-income students receive no boost whatsoever. Not surprisingly, at selective colleges, one is 14 times as likely to run into a student from the richest quarter of the population as he or she is someone from the poorest quarter.

The Fisher case is an attractive vehicle for Justice Kennedy to take his stand. In the litigation to be heard by the Supreme Court, Abigail Fisher, a white student, has sued the University of Texas at Austin for using race in admissions and pointed out that alternative mechanisms used by Texas were effective in enrolling African American and Latino students, rendering racial preferences unnecessary.

The Texas story begins in 1996, when the Fifth Circuit Court of Appeals banned the use of race in admissions at UT Austin and other public institutions in Texas and nearby states in the case of Hopwood v. Texas. In response, Texas devised two alternatives for indirectly promoting racial diversity—providing a leg up to economically disadvantaged students of all races and admitting all students in the top 10 percent of every high-school class. Because Texas high schools are highly segregated, and because black and Latino students are disproportionately poor, the plans produced considerable racial and ethnic diversity.

While proponents of racial preferences have long claimed that there is “no other way” to get racial diversity than to count race in admissions, Texas had indeed found another way. Moreover, a 2012 Century Foundation study coauthored by Halley Potter and me found that seven of 10 leading universities where racial preferences were banned were able to meet or exceed both African American and Latino representation levels achieved in the past using race: UT Austin, Texas A&M, the University of Georgia, the University of Florida, the University of Washington, the University of Nebraska, and the University of Arizona.

In three cases—UC Berkeley, UCLA, and the University of Michigan—minority numbers did drop. But that fact does not suggest that alternatives to racial preferences are unworkable. For one thing, all three universities failed to define socioeconomic status in a way that is fair to minority applicants. None included low family wealth as a factor that could improve one’s chances of being admitted; low family wealth is a major obstacle to life chances that disproportionately benefits black and Latino applicants. (The racial gap in wealth is much greater than the racial income gap is.) Moreover, Berkeley, UCLA, and Michigan are national universities that compete with other national institutions for top minority students and face an impossible situation: Competitors such as Stanford or the University of Wisconsin can continue to use racial preferences, so it’s not surprising that minority numbers dropped at institutions that unilaterally disarmed in the fight for talented minority students.

What would happen if all universities played by the same set of rules? A 2014 simulation by Anthony Carnevale, Jeff Strohl, and Stephen Rose of Georgetown University found that at the most selective 193 institutions, economic affirmative action and percentage plans could reproduce current levels of racial diversity achieved with racial preference, and socioeconomic diversity would rise substantially.

Fisher’s case came before the Supreme Court once before, and in 2013, the Court ruled seven to one that universities bear “the ultimate burden of demonstrating, before turning to racial classifications, that available, workable race-neutral alternatives do not suffice.” The case was sent back to the Fifth Circuit for review under the new standard. In 2014, the lower court upheld the use of race in part because while the Top Ten Percent plan did produce racial diversity, many of the black and Latino beneficiaries were from segregated high schools and therefore, the Circuit court alleged, would not serve as good bridge builders between students of different races. Fisher again appealed to the Supreme Court and the fact that the justices granted the petition to rehear the case does not bode well for supporters of affirmative action.

So what will future of affirmative action look like if Fisher II significantly curtails the ability of universities to employ race in admissions? As I discuss in a new report “Achieving Better Diversity: Reforming Affirmative Action in Higher Education,” in most of the states where affirmative-action policies were banned, states and universities created new paths to diversity.

My Century Foundation colleague Halley Potter has found that in the 10 states where racial affirmative action was dropped, eight states adopted class-based affirmative action programs; eight expanded financial-aid budgets; three rewarded students with the top GPA in each high school and downplayed standardized tests scores; and two adopted stronger programs to allow students to transfer from community colleges to four-year institutions. In three states, individual universities dropped legacy preferences for the children of alumni that tend to benefit white and wealthy students.

Not only did these programs usually produce as much racial diversity as did racial preferences, they also jumpstarted social mobility, new evidence suggests. The New York Times has in recent years published a “College Access Index” which ranks institutions that have high graduation rates that are “doing the most for low-income students.” Nine of the Times’s top ten public institutions for low-income students are in states with affirmative-action bans. By contrast, in the bottom half for social mobility, 16 of the 17  public institutions are in states where universities can employ racial preferences in admissions and therefore have no need to look to socioeconomic alternatives.

Class barriers are looming larger than ever. And evidence suggests that, when it comes to closing achievement gaps, class may matter even more than race. Stanford’s Sean Reardon notes that 50 years ago, the test-score gap between black and white students was twice as large as the test-score gap between high-income and low-income students. Today, precisely the opposite is true.