Inter Milan got their season back on track with victory over Cagliari at the San Siro taking them above their opponents and into the top half of the table.
Thiago Motta put the Nerazzurri ahead in the 54th minute and it looked easy for Inter, who hit the woodwork twice in the first half, when Philippe Coutinho opened his account for the season six minutes later.
But Joaquin Larrivey made it interesting with a goal in the 89th minute which was not, however, enough to prevent Davide Ballardini from losing on his debut on the Cagliari bench.
Inter started brightly with Andrea Ranocchia heading just wide from a corner in the eighth minute.
Giampaolo Pazzini came even closer to breaking the deadlock in the 21st minute when his shot from outside the penalty area was tipped onto the crossbar at full stretch by Michele Agazzi.
Agazzi came to Cagliari's rescue again three minutes later with a fingertip save to push Mauro Zarate's free-kick onto the bar.
The home side finally took a deserved lead in the 54th minute, although the goal should not have been allowed to stand.
Motta was almost a yard offside when he received Ricardo Alvarez's free-kick via a deflection off Pazzini and scored from close range.
There was no controversy about Coutinho's second on the hour mark, though.
Alvarez was the provider again as he spread the play from the centre to Coutinho, who placed his shot from just inside the penalty area right into the bottom corner of Agazzi's goal.
Larrivey then had a goal disallowed for a correct offside decision, although it was a tighter call than the one which Motta benefited from.
Inter started to sit back, content that they had done enough to win the game.
But they were in for a scare when Radja Nainggolan sent in a shot which Larrivey diverted past Julio Cesar in the 89th minute.
Despite a late assault, though, Cagliari were unable to find an equaliser and Inter held on for three valuable points.