It certainly wasn’t a shooting clinic. Nor did the Deering High girls basketball team show much crispness in their offense.

But the Rams did what they’ve done pretty much the entire Class A season: Play smothering defense and win.

Despite shooting a woeful 9-of-49 from the floor, the Rams beat South Portland, 33-21, on Monday in a game between two teams likely headed directly to the quarterfinals in one week’s time.

“It was an eye-opener. I definitely think only good can come out of this,” Deering coach Mike Murphy said. “They know if you come in and you’re not mentally prepared you’re going to struggle.”

Second-ranked Deering improved to 16-1 and will finish the regular season hosting rival Cheverus, the third-place team in Western A on Wednesday.

Most of the Stags (14-2) were in the stands on Monday.

For the better part of three quarters South Portland (12-5) was in position to pull an upset despite its own offensive inefficiencies. The Red Riots were 8-of-35 from the floor and committed 23 turnovers but held leads of 6-2 after a quarter, 11-10 at the half thanks to a 3-pointer by Maddie Hassan with 2 seconds left and 15-12 midway through the third.

That’s when Deering senior Keneisha DiRamio hit a 3-pointer to tie the game. It was the Rams’ fourth basket of the game and their first from outside three feet.

DiRamio then scored on a 3-on-1 break to give Deering its first lead. Defense and free throw shooting (10-of-11 in the second half) did the rest.

South Portland was playing its fourth game without leading scorer Danica Gleason, lost for the season with a dislocated kneecap.

Deering center Marisa MacMillan led all scorers with 11 points, making 9-of-11 free throws. DiRamio had seven points and Chelsea Saucier scored eight for Deering. Hassan scored eight for South Portland.