TUCSON, Ariz. -- Washington State has been the punching bag of the Pac-12 for years and looked like it would be again this season after opening with a home loss to Portland State.

The Cougars have changed the script over the past month, inserting themselves into the Pac-12 championship conversation.

Luke Falk threw for 514 yards and hit Gabe Marks on four of his five touchdown passes, helping resurgent Washington State beat Arizona 45-42 Saturday.

"We didn't really have all the pieces tucked in and into place," Washington State coach Mike Leach said. "We had good individual effort, but we really didn't play well early in the year. We've steadily improved on playing together."

Washington State (5-2, 3-1 Pac-12) beat Oregon in Eugene two weeks ago and tacked on another impressive road victory behind the arm of Falk to remain in the thick of the Pac-12 North race.

The sophomore completed 47 of 62 passes and had the most passing yards ever against Arizona, breaking the mark of 511 yards set by Arizona State's Ryan Kealy in 1998.

Marks caught eight passes for 97 yards, the last one a 9-yard touchdown that put the Cougars up 45-35. Washington State recovered an onside kick to hold on for its first three-game Pac-12 winning streak since 2003. The Cougars also are 5-2 for the first time since opening that same season 7-2.

"Every game it seems like we're talking about this is the game and I guess when you're winning the pressure keeps getting higher and higher," Marks said. "Every game I feel we're solidifying ourselves and being what we thought we were."

Arizona is quickly becoming less than it expected.

The Wildcats (5-3, 2/3 Pac-12) sputtered at times offensively before getting a spark from quarterback Jerrard Randall, who replaced Anu Solomon in the third quarter. He threw for 137 yards, including a 20-yard touchdown to Johnny Jackson with 44 seconds left, and had 105 yards on 10 carries.

No matter what Randall or the Wildcats did on offense, it wasn't nearly enough to offset the trouble they had with Falk and Washington State's Air Raid offense.

"Our players on the sidelines were yelling out the packages and plays that were coming, but it was very frustrating," Arizona coach Rich Rodriguez said. "It wasn't anything new from what they have done before, but we certainly didn't get any pressure on the quarterback."

Arizona rolled over Washington State 59-37 in Pullman last season in a game that featured 994 yards of offense.

This one had 1,114 total yards, though the Cougars got off to a quicker start behind Falk, who had thrown for 911 yards and 11 touchdowns the previous two games combined.

Given all kinds of time to throw by his offensive line, he made it look easy picking apart Arizona's secondary. Falk hit Marks on a 6-yard touchdown on the opening drive, then Marks turned a short pass into a 43-yard score and 14-0 lead.

Falk found Marks for a third score in the second quarter, a 1-yarder, and hit Kyrin Priester in the corner of the end zone for a 6-yard TD that put Washington up 28-14.

Falk had 335 yards and four touchdowns on 30-of-38 passing in the first half, helping Washington State build a 31-21 lead.

"That's really what he's been doing the past three games," Marks said. "He's just really good."

Arizona took a while to get its offense in gear, finally putting together a drive that led to Jared Baker's 1-yard touchdown run to open the second quarter.

Nate Phillips followed with a 69-yard punt return touchdown that tied the game at 14-all, but Shun Brown fumbled a kickoff to set up Priester's touchdown. Baker added a 7-yard touchdown run in the second quarter to keep the Wildcats within reach at halftime.

Falk kept firing and completing to start the second half, hitting Kyle Sweet on a 28-yard pass on third-and-19 to set up Gerard Wicks' 1-yard touchdown run to put the Cougars up 38-21.

Randall replaced Solomon on Arizona's second drive and reeled off a 59-yard run on his first play, but that drive ended with a turnover on downs at Washington State's 11.

Next series, Randall found Cayleb Jones on a 3-yard touchdown pass to pull the Wildcats within 38-28 late in the third quarter. Randall converted a fourth-and-2 with a run on the next drive and Baker pulled the Wildcats within 38-35 with a 6-yard touchdown run.

Falk ended Arizona's rally with a 9-yard touchdown pass to Marks, putting Washington State up 45-35.

"He was just standing back there throwing the ball wherever he wanted," Rodriguez said of Falk.

And with it, he's thrown the Cougars into the mix for the Pac-12 North title.