SAN FRANCISCO — Cliff Lee wore a brown pinstriped suit with a brown tie and brown shoes, and only his hair was unkempt. He was not apoplectic in a quiet Phillies clubhouse Wednesday after a 1-0 loss to the Giants although he had every right to scream. No team had lost a game in which its starting pitcher tossed 10 shutout innings in 18 years.

"What's done is done," Lee said softly.

Two hours and 27 minutes of heartbreaking baseball resulted in the Giants dancing on the infield. They could do so only once Lee had finally relented and surrendered the ball. Twice, pitching coach Rich Dubee told Lee his night was over.

Lee completed nine innings with 89 pitches. He sat on the dugout bench and Dubee approached.

"Hey, that's enough," Dubee said.

"I've got more," Lee responded.

So he continued. Lee was the first Phillies pitcher to throw 10 innings since Terry Mulholland in 1993. A guy named Steve Carlton was the last Phillie to pitch 10 scoreless innings in 1981. And Lee became only the fourth pitcher in the majors to toss 10 innings since 2000.

None of it mattered. The Phillies are alone in last place this late in the season for the first time since April 20, 2007.

San Francisco won when Ty Wigginton, known for his bat and not his glove, bobbled what might have been an inning-ending double play in the 11th. Given the extra chance, Melky Cabrera delivered the game-winning single to right off Antonio Bastardo.

It ruined an epic performance by Lee, who was almost matched step-for-step by Giants ace Matt Cain.

"He didn't want to come out of the game," Charlie Manuel said, "and I didn't want to take him out. But it got to a point where we figured we had to."

When Dubee came to Lee after the 10th, the lefthander once more challenged the decision.

"I tried it again but nothing happened," Lee said.

His final line: 10 IP, 7 H, 0 R, 0 BB, 7 K, 102 pitches, 81 strikes. Lee located his fastball, cutter, change-up, and curveball with devastating success. He needed no more than 13 pitches in any one inning. "Super," Dubee said.

He was still in line for the win when Carlos Ruiz doubled down the left-field line to begin the 11th. Freddy Galvis sacrificed Ruiz to third, and Manuel removed Lee for Jim Thome. Giants manager Bruce Bochy countered with stingy lefthander Javier Lopez.

Manuel checked the matchup sheet he carries in the dugout and saw Thome had faced Lopez 11 times with three strikeouts. So eight times, the future Hall of Famer had put a ball in play. That's all the Phillies needed.

"If he hits a ball, as big and strong as he is," Manuel said, "we have a chance to score a run."

He also figured had he called Thome back and sent John Mayberry Jr. up that Bochy would call for a walk, leaving it in Juan Pierre's hands. Pierre puts the ball in play, but not with force.

Thome struck out on five pitches. Mayberry subbed for Pierre and grounded out. It would come back to haunt them.

"I didn't do it," a despondent Thome said. "I didn't do it."

Manuel could have also opted for Placido Polanco in one of those spots, but declined. Polanco was given a day off and believed to be available for duty. If he had entered as a pinch-hitter, he could have remained at third base.

It is likely Polanco makes the decisive play Wigginton did not in the 11th. Angel Pagan bounced one to Wigginton's left. It hit the heel of his glove and popped out.

"Bastardo did his job and got a double-play ball," Wigginton said.

For the first 10 innings, the game moved at a frenetic pace. At 8:34 p.m. local time, the sellout crowd at AT&T Park stood for the seventh-inning stretch as The Trammps' "Disco Inferno" blared at this ballpark on the bay. The game was being played at a 1970s pace, except the two pitchers in a staredown were making a combined $259.75 million.

Nine innings of scoreless baseball were completed in 1 hour and 50 minutes. Only three batters went to the plate in 13 of the 18 half-innings. Hitters swung early and often against Lee and Cain, who peppered the strike zone.

"That's as good as I think I've seen," Thome, 41, said.

When the ninth began, Cain was late coming out of the dugout. Finally, he emerged, and the fans stood and cheered. Soon, Lee walked from the visitors dugout to lead off the ninth inning of a scoreless game that was 1 hour, 38 minutes long. He flied out to center.

Bochy had the same choice in the bottom half of the ninth and chose to lift Cain for a pinch-hitter, Hector Sanchez, who tapped one to first base. It ate up Laynce Nix, an inexperienced first baseman, and Sanchez reached base on an error. Pagan failed to get a bunt down, fouling off two strikes. Then he grounded into a double play turned adeptly by Jimmy Rollins.

Lee's first pitch of the 10th inning was roped to right by Buster Posey for a single. But Brett Pill followed with the fourth double play turned behind Lee. Even then, Ryan Theriot singled past Wigginton on a ball that probably would be fielded by a normal third baseman. And a normal first baseman would not have dived for a grounder hit by Nate Schierholtz the way Nix did, but Galvis snatched it and dashed to first for the final out, ending Lee's night.

"It was neat," Lee said. "But I'd rather give up a couple runs and us get the win."

A duel was hardly a surprise. Cain's last outing five days earlier was a one-hit shutout of the Pittsburgh Pirates. The only baserunner he allowed was a single to the opposing pitcher.

Once Shane Victorino grounded meekly to first base for the final out of the ninth, Cain sauntered off the mound to rousing applause. His night was done even though he had not allowed a run on a mere 91 pitches. He retired the final 13 Phillies he faced.

He did not win, and neither did Lee. But Cain could smile.

Contact Matt Gelb at mgelb@phillynews.com or follow @magelb on Twitter.