Still, Mr. Lampros received a satisfactory rating five of the six times administrators formally observed him. He has master’s degrees in both statistics and math education and has won awards for his teaching at the college level.

Image Austin Lampros quit after a student he had failed was passed. Credit... Tom Pidgeon for The New York Times

“It’s almost as if you stick to your morals and your ethics, you’ll end up without a job,” Mr. Lampros said in an interview. “I don’t think every school is like that. But in my case, it was.”

The written record, in the form of the minutely detailed charts Mr. Lampros maintained to determine student grades, supports his account. Colleagues of his from the school — a counselor, a programmer, several fellow teachers — corroborated key elements of his version of events. They also describe a principal worried that the 2006 graduation rate of 72.5 percent would fall closer to 50 or 60 percent unless teachers came up with ways to pass more students.

After having failed to graduate with her class in June 2006, Miss Fernandez, who, through her mother, declined to be interviewed, returned to Arts and Technology last September for a fifth year. She was enrolled in Mr. Lampros’s class in intermediate algebra. Absent for more than two-thirds of the days, she failed, and that grade was left intact by administrators.

When second semester began, Miss Fernandez again took the intermediate algebra class, which fulfilled one of her graduation requirements. According to Mr. Lampros’s records, she missed one-third of the classes, arrived late for 20 sessions, turned in half the required homework assignments, failed 11 of 14 tests and quizzes, and never took the final exam.

Two days after the June 12 final, Miss Fernandez told Mr. Lampros that she had a doctor’s note excusing her from school on the day of the exam, he said. On June 18, she asked him if she had failed the class, and he told her she had. The next day, the principal summoned Mr. Lampros to a meeting with Miss Fernandez and her mother. He was ordered, he said, to let her retake the final.

Mr. Arocho, the assistant principal, wrote in a letter to Mr. Lampros that Miss Fernandez had a doctor’s note, issued March 15, permitting her to miss school whenever necessary in the spring. Mr. Arocho did not respond to telephone and e-mail messages seeking comment.