FILE - This Oct. 9, 2014, file photo shows the gurney in the the execution chamber at the Oklahoma State Penitentiary in McAlester, Okla.  (AP Photo/Sue Ogrocki, File)

A long-time associate and mentor to President Obama says the president is "close" to opposing the death penalty but not quite there yet -- and needs to be pushed to do it.

"He's not there yet, but he's close, and needs some help," said Charles J. Ogletree, Jr., a law professor at Harvard University and prominent death penalty opponent who taught the president and First Lady Michelle Obama when both were students there. The legal scholar said he was planning on meeting with his former student next month and would confront him about the issue then.

As Obama has increasingly confronted racial disparities in the criminal justice system and in American society in in his second term -- including on Tuesday before the National Association for the Advancement of Colored People -- Obama has committed to doing more to address these issues in his final year-and-a-half. This week alone, he commuted the sentences of more than 40 low-level offenders, and is visiting a prison in Oklahoma today, becoming the first president to visit a federal penitentiary.

Obama, who has said he supports executions in some circumstances but raised concerns about the application of capital punishment, has not yet focused in this new push on racial disparities in capital trials -- the most serious cases before any criminal court. Now, just as he publicly changed his opinions on other major social issues in which public opinion changed, like gay marriage, some have wondered whether the president will change his perspective. As the charts below show, support for the death penalty, for decades strong in the United States, has been declining in recent years, just as support for gay marriage has increased.

Ogletree predicted that the president will eventually have no choice but to oppose the death penalty, confronted with the data on racial disparities in capital punishment, as well as on the costs of litigating capital cases and on the number of defendants who are eventually exonerated.

"Even if he doesn't change his mind in the next year and a half, I think the public's point of view is going to influence him," Ogletree said. "As a citizen, he can have an enormous amount of influence."

The White House declined to comment for this story, beyond noting times Obama has talked about the issue in the past. He has said that he supports capital punishment in cases where the crime is especially horrific, but worried that the penalty is being meted out unfairly.

"In the application of the death penalty in this country, we have seen significant problems -- racial bias, uneven application of the death penalty," he said last year, following a gruesomely botched execution in Oklahoma.

He asked former Attorney General Eric Holder to review the issue, but the Justice Department hasn't made a recommendation. Last month, the Supreme Court upheld the death penalty, even when administered with what some physicians say is an excruciating cocktail of lethal drugs, although two of the justices raised questions about it remains constitutional. Only nine countries in the world actively execute people, including Iran, Sudan and North Korea, according to an Amnesty International report.

Some advocates for ending capital punishment have encouraged the White House not to take an overly activist stance, preferring action in the states where the issue may be less partisan. Support for capital punishment has fallen most sharply among Democrats and independents, compared to Republicans where support remains high. 

Still, advocates for ending capital punishment say the time is ripe for action. Nationwide, black defendants are more likely than white defendants to receive the death penalty, even after being convicted of similar crimes.

Nowhere has this been more true than in Philadelphia. The city's courts have a history of sentencing black defendants to death at some of the country's highest rates.  In Philadelphia County, for example, there are more African Americans on death row than any other county. Among counties with significant numbers of capital cases, Philadelphia also had the most minority defendants awaiting execution as a share of the overall minority population.

Philadelphia has also been the site of several important studies on how courts and juries treat defendants differently, depending on the color of their skin. One examination of 350 capital cases in the city found that when the law gave jurors a choice, they were 29 times more likely to return a death sentence if the defendant was black.

The racial disparities in death penalty cases have been well documented for decades. The scholar credited with establishing this field of enquiry was David Baldus, a law professor at the University of Iowa who died in 2011.

After studying capital cases in Philadelphia in the decade from 1983 to 1993, Baldus concluded that juries were 29 times more likely to sentence black defendants to death if they identified conflicting circumstances in the case that both aggravated and mitigated the severity of a crime. In such cases, jurors discretion over whether to return a capital sentence.

The disparity is even more pronounced when the victim is white.

"It's a black-lives-matter problem," said Jeffrey Fagan, a law professor at Columbia University. "They don't matter when it comes to capital punishment."

Between 1977 and 2000 across Pennsylvania, murder cases involving a black defendant and a white victim resulted in death penalties at nearly five times the rate as cases in which the defendant was white, the victim black, according to figures from the Death Penalty Information Center in Washington, D.C.

The numbers suggest that jurors are acting on "a visceral fear response, unrelated to the severity of the crime," said the center's executive director, Robert Dunham.

"The risk in a death penalty case is that a jury may be sentencing a defendant to death not based on what he or she did, but because of conscious or subconscious fears that result from the defendant's race," he added.

A subsequent study with Baldus's data from Philadelphia found that black defendants with stereotypically African features -- such as as a broad nose, thick lips and dark skin -- were about twice as likely to receive death sentences in cases with white defendants.

Dunham, who is from Philadelphia, argued the process of selecting a jury for a capital case results in juries that are more likely to hold racial prejudices. The grimly named protocol of "death qualification," in particular, allows prosecutors to object to jurors who oppose death penalty.

Death qualification tends to exclude black jurors from capital cases, since though about 55 percent of all Americans support the death penalty, and the same share of blacks oppose it, according to one recent Pew survey.

As for the prosecutors themselves, about 95 percent of elected prosecutors are white, according to a study published this month.

In recent years, prosecutors in Philadelphia have stopped seeking so many death penalties, although death row there remains overwhelmingly black and Latino. Of the 24 death sentences imposed in Philadelphia in the 21st century, just one was given to a white defendant.

In the meantime, recent research in Delaware, North Carolina, Florida and elsewhere confirms that racial disparities in capital sentencing persist around the country.

Opponents of the death penalty are optimistic, however. Although a majority of Americans still support capital punishment, polls have shown declining support in recent years. Some compare the cause of abolition to that of gay marriage.

"Twenty years from now, people that are for the death penalty are going to be in the same place as people that are against gay marriage," Matthew Dowd, a strategist for former President George W. Bush, recently told ABC's "This Week."

Correction: An earlier version of this post misspelled the first name of Jeffrey Fagan, a law professor at Columbia University. This version has been corrected. We regret the error.