The Brazilian was 0.265 seconds quicker than the championship leader who is seeking his eighth win in nine races.
The Ferrari driver is the first Formula One driver to win the same Grand Prix seven times.
Last season, the Ferrari driver left Magny-Cours after winning his fifth world title with six races to spare.
Ferrari kept Brazilian Rubens Barrichello off the track for Saturday's opening practice at the Bahrain Grand Prix after having to rebuild his new car's gearbox.
Michael Schumacher has put last weekend's Monaco crash behind him after seizing pole position for his home European Grand Prix.
All that you wanted to know about the European Grand Prix.
Ferrari, winners of 15 of last year's 18 races, have now gone three Grands Prix without a win
Formula One world champion Michael Schumacher was named Laureus world sportsman of the year for the second time.
Schumacher's existing deal was due to expire at the end of the 2004 season.
The 23-year-old Finn has 48 points compared to the 44 of Ferrari's second-placed Michael Schumacher.
Narain Karthikeyan said he was happy with his performance in the F1 debut race even though he had a "very bad" start.
"He is hungry to race again and fitter than ever thanks to a new training program," said his manager.\n\n
Hamilton said he only realised the significance of what he had done when he came into the pitlane after taking the chequered flag.
Michael Schumacher of Germany, driving a Ferrari, has won the San Marino Formula One Grand Prix.
Briton Jenson Button looked a threat to the Ferrari with the second best lap in both 45 minute sessions. \n\n
The 36-year-old, now the oldest driver on the Formula One starting grid, said his desire for success remains undimmed.
The former F1 world champion lauded the pit-crew for putting out the fire that engulfed Schumacher's car during Sunday's Austrian GP.
Formula One has banned 'team orders' but old habits die hard and sometimes not at all.
Brazilian Rubens Barrichello once likened Ferrari team mate Michael Schumacher to a sumo wrestler.
Last year team orders forced Rubens Barrichello to move over and let Schumacher win at Spielberg.
Jordan's Indian ace's best lap time at Barcelona's Circuit de Catalunya was only 2.5 seconds off the pace of world champion Michael Schumacher.
Mick Schumacher, son of seven times world champion Michael, made his Formula One test debut with Ferrari on Tuesday at the Bahrain circuit, where 15 years ago his father won the first Grand Prix in the Middle East.
World champions Ferrari will unveil their 2005 Formula One car at their Maranello factory on February 25, the team said on Friday.
The 21-year-old Alonso has a star quality like no other Spaniard in Formula One since the 1950s.