His death was confirmed by a spokesman for St. Francis College in Brooklyn. Dr. Macchiarola, a graduate of the college, was its president from 1996 to 2008. He had been treated for liver cancer.

Dr. Macchiarola (pronounced MAC-kee-ah-row-la), a sanitation worker's son and a devout product of Roman Catholic schools, was 37 when Mayor Edward I. Koch appointed him to lead New York's public school system in 1978. He held the post until 1983.

Succeeding Irving Anker, who had retired, Dr. Macchiarola took the job after he helped the city emerge from near-bankruptcy in the mid-1970s as deputy director of the New York State Emergency Financial Control Board, which had been created during the crisis to oversee the city's finances.

The school system at the time was reeling from budget cutbacks, teacher layoffs and crowded classrooms. The year before, 15,000 teachers, guidance counselors and teachers' assistants were laid off.

In a demanding job that in some eras seemed to change hands almost every year, Dr. Macchiarola had a tenure that, at five years, was notable for its relative longevity. It was testimony to the unusual amalgam of political, managerial, legal and educational skills he brought to the post, salted with street smarts.

Dr. Macchiarola set about imposing rigorous standards for both students and educators. He replaced more than 60 of the system's 110 high school principals, rating their performance poor. He blocked automatic promotions for fourth and seventh graders, requiring them to take remedial summer classes or be held back if they failed to meet certain goals. (Almost 25,000 students were left back in June 1981; in later years, the policy sometimes lapsed and was sometimes revived.)

To address a plague of disrespect in the classroom and occasional violence toward teachers and administrators, he introduced a 307-page required "citizenship" curriculum stretching from kindergarten through 12th grade.

"Anybody who says that what we are trying to do is corny doesn't understand how fragile this democracy is," Dr. Macchiarola said at the time.

In 1982, reading and math scores exceeded the national average for the first time in more than a decade, and crimes against teachers declined by 22 percent.

"He was the standard for chancellor," Mr. Koch said in an interview. "He had great courage, extraordinary knowledge, and his administrative abilities effectuated what he wanted to do."

Dr. Macchiarola, a portly man with thinning hair, impish eyes and a prankster's smile, was notably outspoken in a job known for inspiring taciturn discretion. Before stepping down, he told an interviewer that the school system "would be better off" if its seven board members — five of whom were chosen by borough presidents — were all appointed by the mayor and served without salary. Today the entire system is under the mayor's control.

A longtime member of Brooklyn's Thomas Jefferson Democratic Club, Dr. Macchiarola had been schooled in both Brooklyn and Albany politics by two virtuosos — Assemblyman Anthony J. Genovesi and Stanley Fink, the Assembly speaker. In 1989, he ran for a top elective office in the city, finishing third in the Democratic primary race for comptroller.

He put his political skills to use in the chancellor's office. One victory came in 1981, when, to promote racial integration, he ordered the closing of a middle-school annex in Rosedale, Queens. In protest, many white and some black middle-class parents waged a six-week boycott, but the closing was upheld by the federal courts, which said the annex had led to the segregation of Intermediate School 231 in the largely black Laurelton neighborhood next door.