It took until the last second, but the seventh-seeded Washington Huskies defended their home turf.

Washington took down its Pac-12 rival, No. 8 Oregon, 36-33, in a thriller Saturday.

The Huskies took a 29-18 lead early in the third quarter after Michael Penix Jr. found Rome Odunze for a 17-yard touchdown, and they forced a turnover on downs on Oregon's ensuing drive. 

But the Ducks forced a three and out, and Bo Nix found Troy Franklin for a 30-yard touchdown to cut the deficit to four with 1:36 left in the third.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Washington Huskies celebrate touchdown

Dillon Johnson (7) of the Washington Huskies celebrates with Nate Kalepo (71) after scoring a touchdown against the Oregon Ducks during the second quarter at Husky Stadium Oct. 14, 2023, in Seattle. (Alika Jenner/Getty Images)

Oregon forced another three and out, and on the Ducks' sixth play of their next drive, Jordan James reached the end zone on a 10-yard run, putting the Ducks up 33-29 with just under 13 minutes to go. 

Washington then drove all the way down to Oregon's 1-yard line, but was stopped there needing a touchdown.

The Husky crowd was jumping as the Ducks started the ensuing drive at their own 2-yard line, but they were able to get out of danger and cross midfield. The Ducks took a huge gamble, though, to try to put the game away, going for it on 4th and 3 from Washington's 47. Nix's pass fell incomplete, and the Huskies had the ball with 2:11 left.

After Washington failed to score its previous three drives, Penix only needed two plays to score on this one. The Heisman hopeful's first pass went for 34 yards to Ja'Lynn Polk to put Washington in the red zone. His next pass was an 18-yard touchdown pass to Odunze, and the PAT put Washington up 36-33 with 1:38 to go.

Michael Penix waves

Michael Penix Jr. of the Washington Huskies waves during the first quarter against the Oregon Ducks at Husky Stadium Oct. 14, 2023, in Seattle.  (Alika Jenner/Getty Images)

MEMPHIS PLAYER EJECTED FOR LOW BLOW, OWN COACH CALLS IT 'BS MOVE'

Oregon got in field goal range, but Camden Lewis missed a 43-yard attempt as time expired, giving the Huskies the victory and getting the party started on the field as fans in purple flooded the turf.

Penix threw for 302 yards on 22 of 37 passing, launching four touchdowns, two of them to Odunze. He and Polk connect for 14 receptions for 246 yards and three scores. Dillon Johnson ran 20 times for 100 yards and a touchdown.

Dillon Johnson

Washington running back Dillon Johnson reacts after scoring a touchdown against Oregon during the first half of a game Saturday, Oct. 14, 2023, in Seattle.  (AP Photo/Lindsey Wasson)

CLICK HERE TO GET THE FOX NEWS APP

Nix went 33-for-44 for 337 yards in the loss, while Franklin led the Ducks with eight catches and 154 yards. Bucky Irving rushed for 127 yards on 22 carries, one of them a score.

Oregon will host Washington State next week, while Washington, whose College Football Playoff hopes remain alive after this one, hosts Arizona State.