Sampras, the Wimbledon and US Open champion, lost 3-6, 6-2, 6-4 to a player who was forced to battle through three rounds of qualifying matches only to learn he had been drawn against the top-seeded American.
'When I discovered I was going to play Sampras I made my flight reservation to leave Doha to fly to Jakarta to take part in qualifiers (Indonesian Open) there,' the 20-year- old said.
Alami, who turned professional three years ago and is ranked 204 in the world, eventually won a contest that had begun on Tuesday evening but was halted because of high humidity with Sampras leading 3-1.
'I let him off the hook,' Sampras said. 'I had the match under control but for a set and a half my serve just vanished. I'm very disappointed but upsets happen every day in sport. Today it happened to me.'
In the past year the Casablanca- born Alami has earned a total of dollars 33,000 ( pounds 23,000) while Sampras made dollars 4.5m.
Sampras, who served eight double faults, was inconsistent and Alami broke him three times in succession to take the second set 6-2.
'When I saw the draw I thought to myself that it would be good experience for me and good opportunity to play him. But today he made lots of mistakes and I played great,' said Alami, who now faces Paul Haarhuis, of the Netherlands, in the second round.
Sampras was in good company as Michael Stich, the world No 2 from Germany, followed him out of the event - beaten 5-7, 6-4, 6-4 in the second round by another unseeded player, the Haitian Ronald Agenor.
Thomas Muster, the No 1 seed at the Australian hard-court championships in Adelaide, was beaten 7-6, 4-6, 6-4 in yesterday's second round by the South African Grant Stafford, who is ranked No 86 in the world.Reuse content