AC Milan moved up to third in Serie A after Sunday's 2-0 win over Atalanta, drawing level on points with Inter Milan, who fell further behind runaway leaders Napoli with a 1-0 defeat at Bologna.
Stefano Pioli's side are five points ahead of fifth-placed Lazio in the race for the Champions League thanks in part to Theo Hernandez's volley crashing off the post and into the goal via Juan Musso's back in the 26th minute.
A late dinked finish from Junior Messias at a soaking San Siro ensured Milan had their third league victory in a row.
"I'm counting the goal as mine. Oli (Giroud) did well to knock it down for me, I think it was a good goal," said Hernandez to DAZN.
Milan could have had more in the second half of a underwhelming encounter, Rafael Leo and Messias both wasting golden chances from close range before the latter sealed the points from Leao's pass with four minutes remaining.
The hosts were also cheered by the return of France goalkeeper Mike Maignan after five months out and Zlatan Ibrahimovic, who came on as a second-half substitute.
Veteran forward Ibrahimovic had been sidelined since May last year after having the anterior cruciate ligament in his left knee reconstructed.
"Mike and Zlatan aren't only great players, they're leaders with so much experience and having them available makes a big difference," said Pioli.
Atalanta stay sixth, three points behind Roma in fourth who can join Milan and Inter on 47 points with a win at bottom side Cremonese on Tuesday.
Gian Piero Gasperini's side cannot complain about the result as they didn't trouble Maignan once and have now lost three of their last four league matches.
The Milan giants are a whopping 18 points behind Napoli after Bologna beat Inter 1-0 in Sunday's early match.