Shares of University of Phoenix parent the Apollo Group (APOL) and other education stocks enjoyed a serious rally Thursday morning as Wall Street cheers a favorable ruling from the Department of Education on tuition aid to for-profit colleges.

The decision by the Dept. of Education to relax the final version of a rule some feared would cut off tuition aid to programs run by for-profit institutions is seen as a big victory for the education industry. After all, many of these companies receive the bulk of their profits from federal student aid.

The biggest winners on Thursday in the for-profit college sector were Corinthian Colleges (COCO) and Strayer Education (STRA), which surged 32% and 24% respectively.

Other stocks seeing big gains include Princeton Review (REVU), DeVry (DV) and Lincoln Educational Services (LINC).

Under the new rules, the first year a program could become ineligible to participate in federal student aid programs would be 2015. Plus, a program must fail a debt-load test three times in four years to be kicked out.

It's a massive win," Bob Wetenhall, an analyst at RBC Capital Markets, told Dow Jones Newswires. "Many investors now believe that the sector is investible, due to a combination of reasonable valuations and the removal of the regulatory overhang. I think it's definitely safe to swim."

According to the Department of Education, students at for-profit institutions represent 12% of all higher education students, 26% of all student loans and 46% of all student loan dollars in default. 

Follow Matt Egan on Twitter @MattMEgan5