The McGraw-Hill Companies (NYSE: MHP), which operates the Standard & Poor's rating agency, said Monday they will sell its education business to private equity fund Apollo Global Management LLC (NYSE:APO) for $2.5 billion.

The pestiture, which has been expected since last year, allows McGraw-Hill to focus on financial services, including developing its securities benchmark business and analytics of global securities and commodities.

"After carefully considering all of the options for creating shareholder value, the McGraw-Hill Board of Directors concluded that this agreement generates the best value and certainty for our shareholders and will most favorably position the world-class assets of McGraw-Hill Education for long-term success," Harold McGraw III, CEO of The McGraw-Hill Companies who will lead McGraw Hill Financial once the transaction is complete, said in a statement. 

The deal with Apollo, which has more than $100 billion under management, is expected to close next month or early next year. Under terms of the definitive contract, McGraw-Hill will get $250 million in senior debt issued by Apollo at an 8.5 percent interest rate.

Financial results of McGraw-Hill Education, which had sales of $2.3 billion last year, have declined in seven of the last eight quarters, Bloomberg News reported.