The Giants played with it most of the year, tin swords and all. And they stood their ground one last time Sunday afternoon, fighting for a come-from-behind 3-1 victory over the Los Angeles Dodgers that held more significance than mere fist bumps at the end of a 72-90 season.

There was Tim Lincecum’s Cy Young candidacy, for starters, and the pliant little right-hander put another gilded page in his resume. He tied a career high with 13 strikeouts over seven innings and finished with 265, becoming the first Giants pitcher in the modern era to lead the major leagues.

He also became the first major leaguer in 22 years to record his first nine outs via strikeout; the New York Mets’ Sid Fernandez accomplished the feat July 30, 1986.

Yet the Giants needed a two-run rally in the seventh to keep Lincecum (18-5) from a loss that would have damaged hismajor-league-best winning percentage and, by extension, his Cy candidacy.

“It was a heroic ending,” Lincecum said. “I love watching comebacks when you’re a part of it. You want to take a positive note from everything. And today, everything was positive.”

There were send-offs, too. Omar Vizquel got a hit in what was likely his final at-bat as a Giant, then received a sustained ovation as he was replaced at shortstop. Kevin Frandsen ensured his 2008 line wouldn’t read “DNP” on his baseball card, pinch hitting in the eighth inning and nearly legging out a single in his season debut.

And after the Giants finished one game better than last year’s record, the players gathered on the field around Peter Magowan, who is stepping down after 16 seasons as the club’s managing general partner.

Yet it all teetered on disaster when Brian Wilson allowed two baserunners in the ninth. He escaped for his 41st save, thanks in part to a diving catch by reserve third baseman Ryan Rohlinger.

“I didn’t want to be the reason Timmy got second place for having one (fewer) win,” Wilson said. “He pitched his heart out. I don’t think any of the other candidates had a performance like that today. It was a storybook ending for the season.”

Of course, no regular-season finale can be perfect without the promise of a postseason series. The Giants knew there was little chance of that, especially when their Bad News Bears antics in spring training had many observers forecasting 100 losses.

Manager Bruce Bochy said he hoped the club would have a better “warrior spirit” than it did in 2007, when Barry Bonds’ pursuit of the all-time home run record became a tired trudge rather than a triumphant march.

By a few measures, the Giants clearly competed better. Last season, they were 4-16 in games tied after eight innings. They were 9-9 in those games this season, and youthful energy served them well when it was close and late.

“That’s grinding. That’s battling for nine innings or more,” Bochy said. “These guys have done such a great job and I’ve been happy with that part of our game. When we execute, we’re as good as any team in this division.”

They didn’t pitch well at home and their power-deficient offense had trouble producing with any consistency. Bengie Molina led the team with 16 home runs — and Dodgers left fielder Juan Pierre denied him No. 17 when he leaped to make a catch at the wall.

Whenever the Giants reserve dates in October, Lincecum appears primed for a playoff drive. He pumped upper-90s fastballs past the Dodgers over the first three innings, though Andre Ethier connected for an RBI double.

“It looked like opening day, the way he was throwing,” Bochy said.

When April 7 arrives, Lincecum is almost certain to get the ball against the Milwaukee Brewers. In the meantime, the Giants’ front office will try to do something about those tin swords.

A transit village with apartments, retailers, restaurants and a hotel is rising in Milpitas next to The Great Mall, close to light rail and the under-construction BART station. It’s one of several Silicon Valley projects sprouting up near transit.