ATLANTA — For four hours in a downtown courtroom on Monday, friends and family rose to praise 10 public school educators for their faith, their character and their commitment to the city’s poorest and most vulnerable students.

The educators had all been convicted on April 1 for their roles in one of the nation’s largest school cheating scandals. Though Monday was the day they were expected to be sentenced — with each facing up to 20 years and some more — the task of arriving at an appropriate punishment proved complicated, and the day ended with prosecutors and defense lawyers trying to work out a deal.

Each educator was convicted of racketeering, a felony; some were also convicted of lesser crimes, all connected to their involvement in what prosecutors described as a conspiracy to artificially inflate test scores at struggling Atlanta schools.

The sentences must be approved by Judge Jerry W. Baxter of Fulton County Superior Court, who presided, sometimes testily, over the six-month trial. During Monday’s sentencing hearing, as allies of the educators spoke of their commitment to family and lives of service, Judge Baxter described his struggle in arriving at a proper punishment.