Inter kept their hopes of Europa League qualification alive with a 2-1 victory against nine-man Udinese in a bad-tempered and dramatic encounter at Stadio Friuli.
Goals from Mauro Icardi and substitute Lukas Podolski either side of an Antonio Di Natale equaliser ensured Inter claimed all three points, but Tuesday's Serie A contest will be remembered for a number of flashpoints that led to two red cards.
Maurizio Domizzi was dismissed in the first half for two bookable offences, and after Udinese had bravely clawed their way back into the match, Ghanaian midfielder Emmanuel Agyemang-Badu saw red for a bizarre protest at referee Gianluca Rocchi.
The win leaves Inter one point behind sixth-placed Fiorentina and while Udinese are almost certainly safe from relegation, they will be disappointed to have thrown away their chances of getting a result from an encounter they worked hard to stay in.
Inter coach Roberto Mancini spoke before the game of star striker Mauro Icardi being close to signing a new contract at the club, but the 22-year-old saw little of the ball early on, blazing his only shot at goal high and wide from 20 yards.
Udinese's Orestis Karnezis was the busier of the two goalkeepers and had to be alert to prevent Rodrigo Palacio from latching onto a Hernanes throughball after five minutes.
Hernanes was at the centre of much of Inter's best play in the first half, and he began a neat passing move that saw Danilo D'Ambrosio supply Palacio, only for the striker to head straight at Karnezis.
Udinese's hopes of slowing Inter's ascendancy suffered a severe blow when Domizzi received a second yellow card following a reckless challenge on Hernanes, scything down the Inter captain when he was a long way from danger.
Hernanes almost punished Udinese immediately with a fierce shot that went just wide from 20 yards, and then spurned a close range effort that Karnezis managed to block.
Inter were gifted an opener just 20 seconds into the second half when Danilo slid in late on Mateo Kovacic with a challenge that got nowhere near the ball.
Despite furious Udinese protests, Rocchi pointed to the spot – a decision that replays suggested was justified.
Icardi tucked away the resultant spot-kick for his 18th league goal of the season, but Inter's lead was shortlived.
As Mancini barked orders at his players, Allan broke and played an inch-perfect pass to Di Natale, who shrugged off two defenders and sidefooted coolly into the corner of the net to equalise.
The goal took the 37-year-old level with Roberto Baggio as the joint sixth top scorer in Serie A history, with 205 goals.
The game turned again when Badu claimed he was tripped as Inter attacked, and then in a moment of madness flicked a hand in the direction of Rocchi's face in protest.
Di Natale exploded at the Ghanaian, visibly furious at having seen his side's hard work getting back into the game so foolishly undone.
Mancini then made an astute substitution that proved decisive in helping Inter capitalise on their two-man advantage, sending Podolski on for Guarin.
Moments later, an Inter corner bounced out of the Udinese area to the feet of Podolski, whose first shot rebounded but he made no mistake in firing it left-footed into the top corner at the second attempt.
Icardi thought he had made it three when he backheeled in from two yards out in the dying minutes, but the goal was ruled out for offside.
Udinese then launched a dramatic late charge for an equaliser, but Inter held on.