SANTA CLARA -- Earthquakes coach Frank Yallop had a good feeling Sunday night when sending in rookie Adam Jahn with four minutes remaining in regulation.

"I'm glad he showed confidence in me," said Jahn, who scored in extra time as the never-say-die Quakes gained a dramatic 1-1 tie against the Portland Timbers.

The rookie from Stanford buried his chance in front of 10,525 fans at sold-out Buck Shaw Stadium in a result reminiscent of last year when the team was known as the Goonies.

"It's not an easy finish," said Chris Wondolowski, who had a solid chance blocked in the first half by Portland goalkeeper Donovan Ricketts.

But Jahn, a 6-foot-3 target man from Davis, kept it simple after the ball fell to his foot during a scramble in the penalty box in the 92nd minute.

At first it appeared defender Nana Attakora had earned a penalty kick when taken down in the box. But when the ball fell to Jahn, referee Armando Villarreal allowed play to continue.

Jahn, who had a breakout season at Stanford last year, fired his shot as if he were passing the ball, and ended Portland's 313-minute shutout streak.

"It's the safest shot you can do," Jahn said.

It seemed as if the Timbers' lead was safe in the waning minutes.

The goal-challenged Quakes (2-3-3) got only their second goal in four games. They have netted six scores in the first eight games after a league-best 72 goals last year.

San Jose also averted losing consecutive regular-season MLS games for the first time since August 2011.

Portland (2-1-4) struck in the 59th minute on a tap-in by designated player Diego Valeri of Argentina. The goal came after the Timbers' Ryan Johnson broke free at the top of the penalty box. Steven Beitashour made a sliding tackle to stop the initial threat, but the ball popped free to Valeri, who charged in behind Johnson.

"So unlucky," said Beitashour, who appeared for the first time since last season. "I thought it popped out pretty high, but it went straight back down to them."

San Jose had good chances to equalize after Portland's goal. Steven Lenhart just missed on a header in the 71st minute off a nice serve from Sam Cronin. Three minutes later Sam Garza stole the ball and charged into the box but held on too long before attempting a shot.

Yallop was disappointed with the tie, saying he felt the Quakes should have won after outshooting Portland 12-7.

But for some reason San Jose just can't solve Portland. The Timbers have yet to lose to the Earthquakes in two-plus season in MLS.

The game was more subdued than a week earlier when Portland took a fierce 1-0 victory as Quakes striker Alan Gordon was sent off in the 69th minute after earning a second yellow card.

Tensions had spilled over nine minutes earlier when Gordon used a derogatory remark caught on national TV during an argument with Portland's Will Johnson. MLS commissioner Don Garber suspended Gordon three games for the anti-gay slur.

Contact Elliott Almond at 408-920-5865. Follow him on Twitter at twitter.com/elliottalmond.