The Oregon Ducks had just enough in the tank to eke out a 71-66 upset over the No. 23 Stanford men’s basketball team Sunday afternoon at McArthur Court in Eugene, Ore.

Stanford (13-3, 2-2 Pac-10) hung with the Ducks the entire game despite horrendous three-point (15.8 percent) and foul (52 percent) shooting. After the Cardinal jumped out to an early 6-0 advantage, the lead would change nine times before Oregon (12-4, 3-1) ultimately captured the hard-fought victory.

Oregon’s 5’6” sophomore guard Tajuan Porter, coming off the bench for only the third time this season, energized the Ducks’ offense with blazing speed and nine quick first-half points. Porter swished a three and a fadeaway jumper before slicing through the Stanford defense for a lay-up to help push the Ducks’ lead to their largest of the game, 32-22 midway through the first half.

“In the first half, we were back on our heels,” said head coach Trent Johnson. “Like I told the guys — we’re better than that defensively.”

Sophomore center Brook Lopez, however, put on an offensive show for the seven NBA scouts in attendance. Using his height advantage over 6’9” Oregon senior Maarty Leunen, Lopez combined dunks and lay-ins with one-handed shots from the baseline to close the first half with 20 points on 8-for-9 shooting. The Cardinal entered the locker room trailing by only one, 41-40.

Stanford stepped up its defense and held the Ducks to 34.6 percent shooting in the second half but shot only 28.6 percent in the frame themselves.

In the final minutes, a series of miscues compounded the Cardinal’s problems. With 4:31 remaining and the Cardinal trailing 62-60, senior forward Fred Washington missed two free throws. Brook Lopez, who, at times, struggles with poor shot selection, then forced an airball from the left baseline with six seconds remaining on the shot clock and Stanford down 65-63 with 33 seconds to play. When point guard Mitch Johnson lost the ball the next time down the court, the game — for all intents and purposes — was over.

“There were situations [at the end of the game] where we broke down execution-wise,” Johnson said.

However, the Cardinal coach avoided pessimism in the face of defeat.

“It was a good basketball game,” he said. “A dropped ball here, a missed free throw there makes all the difference. Fourteen assists to eight turnovers — that’s the important statistic. I don’t dwell on shots. For the most part, I thought [the team] did a good job. My only frustration is that that makes two games [lost] in a very tough conference.”

Brook Lopez agreed that the shooting was nothing to worry about.

“We got a lot of looks we wanted,” he said, “shots we normally hit and looks in the post.”

Although junior guard Anthony Goods rarely shoots 2-for-13 from the floor, the team’s foul shooting represents more of a concern. Besides Lopez and senior forward Taj Finger, who combined to go 11-for-12, Stanford shot 2-for-13 from the charity stripe. Washington finished 0-for-6 from the line.

While his foul shooting was weak, Washington’s passing was a highlight. His six assists to zero turnovers paced Stanford’s offensive attack. No Stanford player other than Brook Lopez scored in double digits, but Taj Finger and Robin Lopez each contributed nine points off the bench. Surprisingly, it was Stanford’s shortest starter, junior point guard Mitch Johnson, who pulled down a game-high nine rebounds.

Leunen led the Ducks with 16 points on 5-for-13 shooting, while senior forward Malik Hairston and Porter both notched 15. Oregon committed only six turnovers and shot 19-for-26 from the foul line. With the win, the Ducks moved into sole possession of third place in the Pac-10, behind only No. 5 UCLA and overachieving Arizona State.

With the loss, Stanford, now 13-3, fell into a tie with California for fifth place in the Pac-10 with a 2-2 conference record. The Cardinal can improve in the standings with wins next week against the Arizona schools. The team hosts Arizona on Thursday at 8 p.m. before facing the Sun Devils on Saturday at 7 p.m.