Schools Chancellor Joel Klein announced this afternoon that he is resigning from his post as head of the city’s public education system after eight years — replaced by magazine exec Cathie Black as the first woman ever to hold the position.

“He leaves a legacy of achievement,” Mayor Bloomberg said of Klein during a City Hall news conference.

But Bloomberg also praised his new appointee, saying she has the business savvy to lead the city’s public school system.

Asked why he chose someone without an education background, Bloomberg said Black is a “world-class manager.”

“She has been there and done it. … I think Cathie will take it to a whole other level,” he said.

Black also wrote the book, “Basic Black: The Essential Guide for Getting Ahead at Work (and in Life).”

Bloomberg also defended the choice, saying “in the end” it is the mayor who picks the chancellor.

“It’s a chance to change the world,” he said of the schools chancellor job.

Black said she is “very excited” about “this incredible opportunity.”

Black, 66, who is chairwoman of Hearst Magazines, has overeen the development of some of the industry’s best-known magazines, including Cosmopolitan, Esquire, The Oprah Magazine, Popular Mechanics and Town & Country.

“She has enormous experience managing budgets,” Bloomberg said of Black, adding that it will help in determining “student achievement” for years to come.

Black, who was also present at the news conference, is widely credited for the success she had at USA Today, where for eight years starting in 1983 she was president — and later publisher — as well as a board member and executive vice president/marketing of Gannett, its parent company.

In 1991, Black, a Chicago native who attended parochial schools as a child, became president and CEO of the Newspaper Association of America, the industry’s largest trade organization, where she worked for five years before joining Hearst.

Klein served as schools chancellor under Bloomberg since 2002 when the State Legislature turned control of the city’s school system over to City Hall.

Under Klein’s tenure, the city school system ended the decades-old practice of “rubber rooms” for teachers on probation and stopped the practice of automatically sending failing students onto the next grade.

The city also endorsed the opening of charter schools and began grading schools and teachers in a way to make employees accountable.

Klein will be joining News Corp. as an executive vice-president.

“We’re very fortunate to have a leader of such exceptional depth join the senior executive team of News Corporation,” said News Corp. Chairman and Chief Executive Officer Rupert Murdoch.

“His record of achievement leading one of the country’s toughest school systems has given him a unique perspective that will be particularly important as we look into a sector that has long been in need of innovation.”

Bloomberg praised Klein, saying he brought “stability” over the past eight years at the helm.