Domenico Berardi smashed home an injury-time penalty as Sassuolo stunned Serie A leaders Inter with a 1-0 victory at San Siro.
The visitors were indebted to Andrea Consigli, their goalkeeper who kept Inter at bay with a virtuoso performance, before a clumsy challenge from Miranda on substitute Gregoire Defrel presented Berardi with the opportunity to be the match-winner from 12 yards - one he gleefully accepted.
Inter were not so clinical during the first half, when Mauro Icardi and Adem Ljajic passed up guilt-edged opportunities and they will lose their place at the summit if Napoli avoid defeat at Frosinone later on Sunday.
Reigning champions Juventus can also pull level on points with Roberto Mancini's men if they win at Sampdoria in the evening kick-off, with Inter left to reflect on back-to-back home losses.
Sassuolo, meanwhile, climb above Milan into sixth after extending their unbeaten league run to five games.
Mancini fielded familiar questions over his team's perceived lack of attacking intent before the match but they spurned two glorious chances within the opening five minutes.
Gary Medel, starting in midfield as Mancini named an unchanged XI for the first time in Serie A this season, caught out the Sassuolo defence with a superb lofted ball but in-form striker Icardi pulled his shot wastefully wide.
Icardi then turned provide with a clever flick into the path of Ljajic, who blasted past the post from 12 yards.
Sassuolo were undeterred by those close shaves and looked to attack themselves, with Inter goalkeeper Samir Handanovic saving well from Nicola Sansone's 13th-minute free-kick.
Ljajic then wasted a clearer opportunity on the end of Yuto Nagatomo's slightly deflected cross - mistiming his jump and heading over.
Ex-Inter youngster Alfred Duncan was recalled to the Sassuolo midfield to face his former club and Simone Missiroli almost prodded home his teasing 21st-minute cross, forcing an excellent point-blank save from Handanovic.
The Slovenia international kept another Sansone set-piece at bay before his opposite number Consigli was at full-stretch to brilliantly tip a curling Ljajic attempt around the post.
Consigli excelled himself once more in the 62nd minute - a firm hand repelling Ljajic's well-hit attempt - before the tireless Diego Falcinelli called Handanovic into action at his near post.
The hosts' frustration was evident when Medel escaped punishment for kicking out at Sansone and Defrel forced Inter centre-back Miranda to make a last-ditch block.
Consigli got down to claw away a low 20-yard shot from Icardi and, when the forward took Sassuolo's goalkeeper out of the equation by rounding him 10 minutes from time, substitute Rodrigo Palacio had his eventual attempt blocked on the line by Federico Peluso.
Handanovic was alert to deny sub Antonio Floro Flores at close quarters as the clock ticked down but a fine afternoon for goalkeepers belonged to Consigli, who pushed testing efforts from Ljajic and Inter replacement Stevan Jovetic away from the top corner.
Those heroics were rewarded in dramatic fashion as Miranda damagingly lost his composure and was forced to look on, crestfallen, as Berardi kept his to hand a tightly contested title race its latest twist.