What was once politically unthinkable has become a bipartisan venture. Mr. Obama is making common cause with Republicans and Democrats who have come to the conclusion that the United States has given excessive sentences to many nonviolent offenders at an enormous moral and financial cost. This week, Mr. Obama commuted the sentences of 46 such prisoners and gave a speech calling for legislation revamping sentencing rules by the end of the year.

He came to the Federal Correctional Institution El Reno, about 30 miles west of Oklahoma City, for a firsthand look at what he is focused on. Accompanied by aides, correctional officials and a phalanx of Secret Service agents, Mr. Obama passed through multiple layers of metal gates and fences topped by concertina wire gleaming in the Oklahoma sun to enter the facility and talk with some of the nonviolent drug offenders who he argues should not be serving such long sentences.

El Reno, a medium-security prison with a minimum-security satellite camp that together house 1,300 men, was locked down for the visit. The campus of two-story brick buildings separated by neatly trimmed grass remained eerily silent and empty, with no one in sight other than a few security officers peering through binoculars from a rooftop. Rather than bursting at the seams, it had the antiseptic feel of an abandoned military base, except for the cattle being raised on the property.

The president was brought to Cell Block B, which had been emptied for the occasion, its usual occupants moved to other buildings. The only inmates Mr. Obama saw during his visit were six nonviolent drug offenders who were selected to have a 45-minute conversation with him at a round table. It was recorded for a Vice documentary on criminal justice to be shown on HBO in the fall.