Fourth-seeded Gorham moved into the Class AA South semifinals on Wednesday by posting a 48-45 victory over No. 5 Sanford at Gorham.
The Rams (11-8) await the winner of the game between No. 1 South Portland and No. 8 Massabesic of Waterboro for a 7:30 p.m. semifinal on Wednesday, Feb. 19, at Cross Insurance Arena in Portland.
The Spartans wind up 7-12.