Democratic presidential candidate Hillary Clinton on Friday urged students of an all-boys academy for black and Latino youth to heed “the example of Nelson Mandela,” who she said shunned bitterness and even embraced his onetime white jailers.

Clinton addressed a breakfast Friday morning in midtown Manhattan of students who attend the Eagle Academy and donors who help fund the school’s programs. She recalled meeting the late South African leader, who had spent 27 years in prison, many on an island, before becoming the nation’s president in 1994.

“When he was finally released, he knew he had a choice to make: He could carry the bitterness and hatred of what had been done to him in his heart forever, but if he did that, he knew he would still be in prison — not the prison on the island, not the cell that he took me to see, but his heart and his mind would still be imprisoned,” Clinton said.

Sign up hereSign up for The 1600

Some 3,000 boys attend the sixth through 12th grades at the academy, with locations in the five New York City boroughs and in Newark, N.J. Officials noted the academy is “often confused for charter schools” but isn’t.

Clinton had spoken at the academy’s first graduation several years after its 2004 founding.

“The graduates, as I recall, walked in to the theme song from ‘Rocky,’ because everyone there that day knew what it was like to be knocked down and get back up,” Clinton said in remarks lasting about 18 minutes.

advertisement | advertise on newsday

Clinton, a former first lady, U.S. senator from New York and secretary of state, now has 2,165 of the 2,383 delegates needed to secure the Democratic nomination for president. Sen. Bernie Sanders of Vermont has 1,357 delegates.

Friday’s fundraiser, at Gotham Hall on West 36th Street and Sixth Avenue, was in an elliptical rotunda building of steel, limestone and sandstone.

Clinton lamented statistics showing that 75 percent of New York’s prison population once came from just seven New York City neighborhoods.

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

People in such neighborhoods have “often been left behind and left out, feeling that their future was inevitable, which to me is such a rebuke to the American dream and the potential that our country should represent,” Clinton said.

Such schools as Eagle, she said, “go right at what had been called the school-to-prison pipeline” — a reference to criticism that disciplinary policies in schools with large minority populations steer children into the criminal-justice system.

Clinton also praised first lady Michelle Obama’s remarks Tuesday to 4,000 college hopefuls at an event uptown co-sponsored by MTV.

“Follow the excellent advice that Mrs. Obama gave the other day to a group of seniors up in Harlem: Never, ever hesitate to ask for help,” Clinton said.