AC Milan put the Kaka transfer saga behind them to earn a vital 1-0 Serie A victory over Fiorentina at the San Siro to keep their title hopes alive.

Third-placed Milan began the day nine points behind leaders Inter Milan but closed the gap to just six ahead of their bitter rivals' trip to Atalanta on Sunday. The build-up to Milan's match had been dominated by Manchester City's reported 100-plus million euro bid for Kaka and Milan fans made their thoughts known before kick-off by unveiling a host of banners pleading with the Brazilian star to stay.

Milan coach Carlo Ancelotti kept the former FIFA World Player of the Year in the starting side and handed ex-England skipper David Beckham a home debut. However, Ronaldinho was dropped to the bench in favour of Massimo Ambrosini as Ancelotti looked for more midfield steel.

Kaka would have dearly loved to score but instead it was his teenage compatriot Pato who snatched the winner to condemn Fiorentina to a second successive defeat. They remain in sixth place in the table.

Milan survived an early penalty scare as Stevan Jovetic ran into the area and took the ball around goalkeeper Christian Abbiati, who got the slightest of touches on the ball before up-ending the attacking midfielder. The referee originally pointed to the spot but then changed his mind after consulting the linesman.

Fiorentina were to be further enraged when Riccardo Montolivo crumpled in a heap under a robust challenge from Gianluca Zambrotta, but again no penalty was given. By then Milan had the lead through a sumptuous strike from Pato on seven minutes.

Beckham had tried to cross from the left but hit a defender.  As players rushed to the loose ball, Beckham got there just before two Fiorentina defenders and poked it back to Marek Jankulovski who played in Pato in the space vacated by the visiting players.

There looked to be little danger from his position just inside the box in the left hand corner but Pato hit a stunning strike across goal and in off the far post. Fiorentina were enjoying the better of the game, although with the talent at Milan's disposal they looked the more dangerous.

Even so a Montolivo shot forced Abbiati to parry and on 35 minutes former Milan forward Alberto Gilardino should have done better with a free header from Juan Vargas's cross than plant it well over the bar. Just before halftime, Pato played a charging Beckham into the box on the right, from the same distance that the Brazilian had scored, but the former Manchester United man could not get the same power on his shot and Marco Storari tipped it around the post.

Fiorentina should have equalised on 66 minutes when Vargas got to the byline and crossed to Mario Santana but the Argentine put his shot too close to Abbiati who managed to save. By this point, Fiorentina were in complete control and Milan merely hanging on with Ancelotti replacing Clarence Seedorf with defensive midfielder Mathieu Flamini.

But hold on they did to secure a win in what may be Kaka's final match in the famous red-and-black jersey.