TEMPE, Ariz. (AP) — The fast start to the season was great. So was ending a losing streak and sending the seniors off in style in their final home game.

Becoming bowl eligible checked off one of the top goals for the season.

But of all that Arizona State (7-5, 5-4 Pac-12) accomplished this season, beating rival Arizona was the one thing coach Todd Graham wanted most in his first season in the desert.

It was about bragging rights, getting a leg up on in-state recruiting, giving a boost to the fans and alumni.

Above all that, the Sun Devils' dramatic win over the Wildcats on Friday night was validation for Graham that his makeover of the program is on the right track.

"It can't be any bigger, just like on the other end of it, if we wouldn't have won, it would have been the worst thing that could have happened," Graham said. "I'm elated. I'm just thrilled to death."

The win completed a long road of confirmation for Graham.

The former high school coach from Texas came to Arizona State with a reputation for not following through.

Graham spent one season as the head coach at Rice, leaving for Tulsa days after signing a contract extension with the Owls. He led the Golden Hurricane to three bowl wins in four years before heading out for Pittsburgh, a job he believed was a step up.

Graham bolted Pitt after one mediocre season, leaving the Panthers bitter and sending up red flags in the desert for Sun Devils fans who saw their football team as a destination, not a stopover to a better job.

That's when Graham went to work.

Stumping for a job he already had, Graham went around shaking hands and talking to fans like he was a politician on the campaign trail.

Preaching discipline and an up-tempo style that would be fun to watch, Graham managed to generate interest in the crowded Phoenix sports market and beyond.

The Sun Devils lived up to the hype early in the season, playing almost penalty-free and at a pace that left opponents breathless while winning five of their first six games.

Arizona State went through a stretch of adversity after that, losing four straight games before clinching bowl eligibility by rolling over Washington State in its seniors' final home game.

The only thing left was to beat Arizona, which Graham had said was his top priority from the day he got the job.

The Sun Devils did just that, helping their coach land the first blow against rival coach Rich Rodriguez, his former boss at West Virginia, while securing their first winning season since 2007.

"This was definitely a must," Graham said. "This was the first check on the list of the fans when I talked to them: 'This game, coach, you better win this game.' So I'm proud to bring it back to them."

The Sun Devils did it in dramatic fashion.

After a close first half, the Wildcats appeared to be headed toward a lopsided win by scoring 18 points in the third quarter, leading 27-17 and seemingly with all the momentum on their side.

Arizona State quickly snatched it back, scoring 24 points in the fourth quarter for a 41-34 victory at Arizona Stadium.

When it was over, Graham took the Territorial Cup on a victory lap of sorts in the stadium of his biggest rival, giving Arizona State's fans a chance to reach out and touch it.

Inside the Sun Devils' locker room, Graham presented the cup to former ASU coach Frank Kush, someone he has become close to as he's tried to bridge the program's past to the present.

Graham also received a text message from his predecessor, Dennis Erickson, and was nearly hoarse after climbing the narrow stairs from the visitor's locker room to the field where he addressed the media.

"I'm proud of him," Arizona State freshman running back D.J. Foster said. "I know this is something he really wanted."

The Sun Devils still have some work to do with a yet-to-be-determined bowl next month.

Whatever happens, this first season under Graham has been an unqualified success, if only for that one game — the one the coach wanted the most.