Sandra Feldman, 65, a tough and spirited former teacher and labor leader who went from an impoverished childhood in a Coney Island tenement to the presidency of the nation's second-largest teachers union, died of breast cancer Sept. 18 at her home in New York City.

As president of the American Federation of Teachers from 1997 to 2004, she pushed for reducing class size, for quality preschool programs and for higher teacher salaries. The union's "unfinished agenda," she said in her farewell address last year, included "the fight for a level playing field for all children, in and out of school."

Smaller than the 2.7 million-member National Education Association, the American Federation of Teachers grew by about 350,000 members during Ms. Feldman's presidency, topping the 1 million mark in 1998. (Membership is now more than 1.3 million.) She was the union's first female president since 1930 and its 15th president since its founding in 1916.

Although she considered herself a union person through and through, the organization during her tenure considered ideas that didn't always conform to union dogma, including public charter schools and new work rules for teachers in a bid to raise the academic achievement of low-income students.

"Sandy did some of her best work behind the scenes, working with district leaders and others to help with reforms that might otherwise have been hampered by union positions," Ron Wolk, founder of the weekly newspaper Education Week, told The Washington Post last year.

She voiced support for school and teacher accountability and was less critical of the Bush administration's signature education effort, the No Child Left Behind Act, than her National Education Association counterpart. She contended, however, that the administration had not adequately financed and enforced the initiative.

"It would have been easy to give in to the traditional labor position that this [No Child Left Behind] was bad, but she didn't," said Kati Haycock, director of Education Trust, an advocacy group for low-income and minority children. "To the very end, she was saying, 'We've got to try to make this work.' "

In 2003, Ms. Feldman proposed Kindergarten-Plus, a program that provides learning opportunities to disadvantaged students before and after the school year. Several states are considering Kindergarten-Plus legislation.

Sandra Feldman was born in the Coney Island section of Brooklyn to a father who was a milkman and a mother who worked in a bakery when her diminished health allowed her to. She grew up in a run-down tenement and later a public housing project. She was saved, she often said, by the public school across the street from her home.

According to the New York Times, a second-grade teacher gave her such books as Robert Louis Stevenson's "A Child's Garden of Verses," which she read voraciously, often at home in bed while suffering from asthma.

She graduated from James Madison High School in Brooklyn in 1956 and entered Brooklyn College at 16. That's where she got her first taste of what she called "rabble-rousing" through involvement in socialist politics and the civil rights movement. She received her undergraduate degree in 1960.

During a campaign to integrate Howard Johnson restaurants and as employment committee chairwoman of the Congress of Racial Equality in Harlem, she met famed civil rights organizer Bayard Rustin, who became a mentor. She took part in the 1963 March on Washington for Jobs and Freedom and was arrested twice during the Freedom Rides.

She was a substitute third-grade teacher for six months at an East Harlem school, but the experience was not a happy one.

"I totally identified with the kids. I used to bring them chicken soup and fruit when they were sick," Ms. Feldman told the New York Times. "But I had no training, and I soon lost complete control of the class. I concluded that, if I was going to keep on teaching, I better learn how."

While working on a master's degree in literature at New York University, which she completed in 1963, she taught full time at Public School 34 on New York's Lower East Side. She joined the teachers union and organized the entire teaching staff within a year.

Albert Shanker, who in 1964 became president of New York City's United Federation of Teachers, hired Ms. Feldman in 1966 on Rustin's recommendation to be the union's full-time field representative. She handled member grievances for the union, the American Federation of Teachers' largest affiliate, and was deeply involved in the city's bitter and protracted teachers strike in 1968.

Shanker became president of the American Federation of Teachers in 1974 while retaining his position as head of the New York local; Ms. Feldman directed the local's staff. In 1986, he relinquished his local duties, and Ms. Feldman took over as president and executive director.

She was chosen by the union's executive council to finish Shanker's term after he died of cancer in 1997, and she was elected to three two-year terms, which she served until her retirement last year.

"Perhaps more than any other person in a similar position, New York's children and then the nation's low-income children became her children," said Haycock, of Education Trust. "She humanized the issues, put a child's face on them and connected them to the intellectual rigor of Al Shanker."

Ms. Feldman's marriage to Paul Feldman ended in divorce.

Survivors include her husband of 25 years, Arthur Barnes of New York City; two stepchildren, David Barnes and Donna Marie Barnes, both of New York City; a brother; a sister; and two grandchildren.

Sandra Feldman led the American Federation of Teachers.