WASHINGTON — Shortly after Senator Rand Paul filed suit last month against the Obama administration to stop its electronic dragnet of American phone records, he sat down for lunch with Attorney General Eric H. Holder Jr. in his private dining room at the Justice Department.

Mr. Paul, a Kentucky Republican, is one of the Obama administration’s most vocal critics. But their discussion focused on an issue on which they have found common cause: eliminating mandatory minimum sentences for nonviolent drug offenders.

The two men are unlikely allies. Their partnership unites the nation’s first African-American attorney general, who sees his legacy in a renewed focus on civil rights, and some of Congress’s most prominent libertarians, who have accused the Obama administration of trampling on personal freedom with drones, wiretaps, tracking devices and too much government.

While a range of judges, prosecutors and public defenders have for years raised concerns about disparities in punishment, it is this alliance that may make politically possible the most significant liberalization of sentencing laws since President Richard M. Nixon declared war on drugs.