Keothavong was a double break up at one point in the third set
British number one Anne Keothavong squandered the chance to reach the last eight of the Bank of the West Classic as she lost to Marion Bartoli.
The 24-year-old threw away a potential match-winning position against the 2007 Wimbledon runner-up.
Keothavong was 4-1 up in the deciding set and heading for the quarter-finals but then lost four straight games.
Although she levelled at 5-5, she could not stop the world number 15 closing out a 6-3 1-6 7-5 victory.
Bartoli raced through the first set after taking a 3-0 and 4-1 lead.
However, the second set was an entirely different matter, with Keothavong in complete control.
Bartoli held serve to go 1-0 up in the decider but Keothavong won the next three games to appear on course for another highly impressive victory following her defeat of world number 33 Sania Mirza in the first round.
However, Bartoli produced an excellent fightback to move into a quarter-final meeting with world number eight and second seed Anna Chakvetadze.
Bartoli said: "From one double break down it was almost the end for me.
"I decided I was going to win this match whatever it takes. Anne was playing so well from the baseline and was hardly missing one ball.
"It was hard to do it but I was able to get those winners."
Meanwhile, fifth seed Patty Schnyder was a 7-6 (10-8) 6-4 winner over Russia's Alisa Kleybanova and the Swiss star will now face Serena Williams.
Samantha Stosur is also through after upsetting Russian third seed Vera Zvonareva 6-3 6-2 and will now face Canadian qualifier Aleksandra Wozniak.
The Australian, who got her place in the tournament after Lindsay Davenport pulled out, quickly found her stride and overpowered Zvonareva with a huge serve and clean groundstrokes.
"I really made the most of my opportunity getting in," said Stosur, who ended the match by serving four aces.