MIAMI (AP) -- Heat guard Ricky Davis knows what his team is playing for at this point in a trying season.
"We're working on a pick, I guess," Davis said after a 96-91 loss to the Memphis Grizzlies ensured Miami will finish with the worst record in the NBA. "We'll see what we can get for it."
With the league's worst record (14-65), the Heat will have the best chance to win the draft lottery held on May 20.
Hakim Warrick and Kyle Lowry each scored 17 points, Mike Conley and Juan Carlos Navarro scored 15 points apiece as the Grizzlies shot 42 percent from the floor (33-of-78) while holding the Heat to 38 percent shooting (33-of-88).
"I thought everybody played their role and nobody tried to do too much," Conley said.
Memphis led 31-25 early in the second quarter before going on a 19-6 run. Navarro and Lowry combined for 14 of the 19 points during the run.
"We got some open shots and got the game to our pace, we got out and ran," said Lowry, who also had six rebounds, four assists and three steals.
Rudy Gay was quiet for most of the first half until his two-handed baseline dunk gave the Grizzlies a 52-36 lead. It was his first field goal of the game. Gay finished with 14 points on 5-of-18 shooting.
Miami trailed by as many as 19 in the first half, but pulled to 65-60 on a 3-pointer by Kasib Powell. Memphis built its lead to 14 in the fourth quarter, but the Heat rallied. A dunk by Stephane Lasme with 2:25 remaining cut the lead to 92-88.
"I was pleased with the way we responded to their run," Grizzlies coach Marc Iavaroni said. "We cut our turnovers down and stabilized it by hitting some big shots."
Gay responded with a layup, but Chris Quinn hit a 3-pointer on the ensuing possession. Gay and Quinn each traded misses before Andre Brown tipped in a shot with 59 seconds left giving Memphis a 96-91 lead.
"We just ran out of fire power at the end and didn't make two or three stops," Heat coach Pat Riley said. "We were just fighting from behind the whole game."
The Heat need two wins in their final three games to avoid having the worst record in the franchise's 20-year history. The 1988-89 expansion team went 15-67.
"As a competitor, you never want to go down like that," Quinn said. "With three games left, all we can do is play as hard as we can and try to get some wins."
Conley tied his career-high with three 3-pointers. He also hit three against Phoenix on April 8. ... The Heat announced before the game that they signed guard Blake Ahearn for the remainder of the season. Ahearn, the 2007-8 NBA Development League Rookie of the Year, was originally signed to a 10-day contract with the Heat on March 21 and signed another 10-day contract March 31. ... Heat forward Kasib Powell left the game late in the fourth quarter with a leg cramp.