''Finishing fourth is really close to our hearts and we'll do everything we can to stay there,'' Hamouma said. ''We missed out last season and we don't want that to happen again.''
Saint-Etienne is provisionally five points ahead of fifth-placed Lyon, which travels to sixth-placed Marseille later Sunday.
Hamouma collected a pass with his back to goal, turned and hit a powerful shot into the top right corner from 25 yards (meters) for his ninth league goal of the season.
Erding pounced after Max-Alain Gradel's free kick hit the wall and looped up invitingly for the Turkey striker to also grab his ninth of the campaign.
Also Sunday, it was: Lorient 1, Ajaccio 0; Reims 1, Evian 0; Sochaux 2, Nice 0; Toulouse 1, Nantes 1; and Valenciennes 0, Bordeaux 1.
Paris Saint-Germain can clinch the title on Wednesday if it beats Rennes at home or second-placed Monaco fails to beat Guingamp the same evening. They are playing Wednesday because Guingamp and Rennes contested the French Cup final on Saturday, with Guingamp beating its Brittany rival 2-0 to win the trophy for the second time.
Bordeaux scored through fullback Julien Faubert in the 74th to relegate Valenciennes.
Reims stayed in eighth place thanks to a first-half goal from midfielder Prince Oniangue, while Evian's defeat leaves it just one point above the relegation zone.
Ninth-placed Lorient took the lead through forward Jeremie Aliadiere in the 18th minute and held on despite having defender Bruno Ecuele Manga sent off midway through the first half.
While Valenciennes joins last-placed Ajaccio in the second division next season, Sochaux still has a chance of avoiding the drop, after beating Nice 2-0 with a goal from Ghana forward Jordan Ayew and an own goal from defender Nemanja Pejcinovic.
Forward Wissam Ben Yedder's 13th league goal of the season earned Toulouse a draw after defender Oswaldo Vizcarrondo had given Nantes an early lead.