Putting nonviolent offenders away for long mandatory sentences costs the United States $80 billion a year, enough to pay for universal prekindergarten for all 3- and 4-year-olds, or free tuition at every public college and university, President Obama said Tuesday in a wide-ranging speech to the annual conference of the NAACP.

But the greater price is a psychic one, Obama said, measured in hopelessness and lives ruined, as well as anger and mistrust, because African Americans and Hispanics are more likely to be arrested and given longer sentences than whites for the same nonviolent crimes.

"Any system that allows us to turn a blind eye to hopelessness and despair, that's not a justice system, that's an injustice system," Obama said. "Justice is not only the absence of oppression, it's the presence of opportunity."

In a 45-minute speech to about 3,000 people at the Convention Center, Obama provided a road map for an overhaul of the criminal justice system, urging reduction or elimination of mandatory minimum sentences for nonviolent crimes, a review of the use of solitary confinement, barring employers from asking job applicants about their criminal history, and other changes.

He called on Congress to enact changes this year. In addition, Obama proposed that felons who have served their time should have the right to vote restored, as a way to help reintegrate them into society.

"If you are a low-level drug dealer or violate the terms of your parole, you have to be held accountable and make amends, but you don't owe 20 years," Obama said. "You don't owe a life sentence. That's disproportionate to the price that should be paid."

It was one of the most expansive speeches on crime and justice issues of Obama's tenure, though in some senses it was overshadowed by the announcement earlier in the day of the historic nuclear deal with Iran. His speech, originally scheduled for 3 p.m., began about two hours later; aides said he was discussing the agreement with world leaders. Even as his motorcade zipped from Philadelphia International Airport to the convention hall, Obama was on the phone with King Salman bin Abdul-Aziz Al Saud of Saudi Arabia.

Mandatory minimum sentences have disproportionately affected African Americans and Latinos, and there is a developing bipartisan consensus to change sentencing guidelines and smooth out disparities in punishment. Several Republican presidential candidates, including Kentucky Sen. Rand Paul, have called for changes in the way the law treats nonviolent offenses.

In Washington, a bipartisan group of senators gathered Tuesday to discuss getting criminal justice changes passed this legislative year. In the House, a group of lawmakers formed a caucus focused on criminal justice reform.

The cause has "created some unlikely bedfellows," Obama said, including the NAACP and the conservative billionaire Koch brothers, the ACLU and the conservative Americans for Tax Reform.

Obama's 28th visit to Pennsylvania as president came the day after he commuted the sentences of 46 drug offenders serving long federal sentences, doubling the number of nonviolent criminals granted clemency during his administration.

He drew cheers when he gave the crowd his definition of justice.

"Justice is living up to the common creed that says, 'I am my brother's keeper and my sister's keeper,' " Obama said. "Justice is making sure every young person knows they are special and they are important and that their lives matter - not because they heard it in a hashtag, but because of the love they feel every single day. Not just love from their parents, not just love from their neighborhood, but love from police, love from politicians.

"Love from somebody who lives on the other side of the country, but says, 'That young person is still important to me.' "

After the speech, Obama attended a Democratic National Committee fund-raiser at the Rittenhouse Hotel hosted by Philadelphia lawyer Steve Cozen. A DNC official said that 30 people who contributed up to $33,400 each attended.

As busy as the president was Tuesday, it did not detract from the intensity of his address.

His speech was filled with statistics and references to policy changes as he made a case for reform:

An African American man born 25 years ago has just a 1-in-2 chance of being employed today.

The nation's prison population has ballooned, from 500,000 in 1980 to 2.2 million today.

One-third of the Justice Department budget is spent on incarceration costs.

"On Thursday, I will be the first sitting president to visit a federal prison," Obama said, the room roaring with applause. "I'm going to shine a spotlight on this issue."

Security was predictably tight. Thousands were screened as they arrived shoulder to shoulder, some in wheelchairs and others using walkers, to hear the speech.

Obama's address came during a time of acute sensitivity about the nation's racial divisions and widespread unrest over police involvement in the deaths of unarmed African Americans. He spoke three days before the one-year anniversary of the chokehold slaying of Eric Garner by New York City police. A $5.9 million settlement with Garner's family in that case was announced Monday.

The president's impassioned eulogy for the Rev. Clementa Pinckney, one of nine black worshipers shot to death last month at a historic African Methodist Episcopal church in Charleston, S.C., was still fresh in many minds Tuesday. That was where Obama broke into song, leading mourners in "Amazing Grace."

In her brief introduction of the nation's first African American president, NAACP board chairwoman Roslyn Brock was cheered when she said: "Mr. President, the NAACP also believes in amazing grace."

Obama returned the favor, to equally ebullient cheers.

"Let's get something out of the way up front," he told the crowd. "I'm not singing today."

The June 17 massacre during a prayer meeting at Emanuel A.M.E. Church, allegedly by a 21-year-old man who authorities believe was inspired by white separatism, prompted South Carolina lawmakers to pass a bill ordering that the Confederate battle flag no longer be flown outside the statehouse in Columbia. Gov. Nikki Haley signed the bill Thursday, and the flag came down the following day.

When the NAACP's five-day convention opened Saturday in Philadelphia, its board of directors voted to end the civil rights group's 15-year boycott of South Carolina. That boycott began in 2000, when the state refused to take the flag off the Capitol grounds.

On Wednesday, former President Bill Clinton is scheduled to speak at the convention, followed in the evening by Loretta Lynch, the first African American woman to serve as the nation's attorney general.


Inquirer staff writers Sofiya Ballin and Sarai Flores contributed to this article.