Santa Clara, Calif. -- On a winter night in 2002, former Raiders executive Amy Trask returned home just in time to answer a ringing telephone. Al Davis was on the line.

Trask was distracted after rushing through the front door and made out only snippets of the conversation. She heard the Raiders owner mention something about trading Jon Gruden.

"I really don't think we should do this,'' Trask recalls saying.

"You didn't hear me,'' Davis replied. "I just told you that I did it."

That stunning blockbuster marked the last time a hot coaching commodity was traded from one NFL team to another. Now it's Jim Harbaugh's turn. And the news could come just as swiftly.

The 49ers are expected to part ways with their headstrong but highly successful coach soon after Sunday's season finale against the Cardinals. The Raiders, who once traded away a charismatic, ambitious young coach, are among the candidates to be on the receiving end this time — if Harbaugh chooses to stay in the NFL.

How do you trade a coach? It's more complicated than trading a player, which explains why it has happened only a handful of times in the modern era, albeit involving some of the biggest names in coaching -- Gruden, Bill Belichick, Bill Parcells and Dick Vermeil, to name a few.

It's such tricky process that the 49ers might have to fire Harbaugh if they can't swing a deal — or if the coach refuses to play along. (He would have to sign off on any deal and might not be in the mood to make things easy on his bosses).

Harbaugh won like crazy, especially over his first three seasons when the team went 36-11-1 and reached three NFC title games and a Super Bowl.

But along the way he has clashed with CEO Jed York and general manager Trent Baalke, who have apparently concluded that the Harbaugh-induced headaches now outweigh the wins.

Harbaugh has one season remaining on a five-year deal that pays him $5 million per year. But, strange as it sounds for a coach getting pushed out of town, he's also in position to earn a significant pay raise.

This is where it gets complicated. Unlike most players, head coaches under contract have veto power when it comes to their trade destination. It's essentially a two-step process: 1. The two teams would need to agree on trade compensation. 2. The new team would need to work out a contract with the coach (whose current contract doesn't generally get shipped over).

Both parts of the equation are high stakes. Harbaugh will be operating with substantial contract leverage because the University of Michigan has reportedly offered him a six-year deal in the $48 million range. There is no protocol for compensation between an NFL team and a college team.

Harbaugh, despite falling out of favor amid a 7-8 season, is the hottest name on the market.

"He's been an excellent football coach, and we're losing sight of that because of all the distractions,'' former coach Herman Edwards said in a phone interview.

Edwards, now an ESPN analyst, was technically the last NFL coach to be traded. In 2006, the Jets agreed to let Edwards out of his contract so that he could replace Dick Vermeil with the Chiefs.

The Jets haggled for a bit but settled for a fourth-round draft pick. "I finally got a chance to show I was worth a draft pick,'' cracked Edwards, who went undrafted as a college senior and then played 10 years in the NFL.

The compensation for Harbaugh is tougher to peg. Mike Florio of Pro Football Talk reported last offseason that the Browns were poised to offer two third-round draft picks for the 49ers coach. But now Harbaugh is a year closer free agency and coming off of tumultuous season, so the asking price likely has fallen.

Could Harbaugh step down from his 49ers post in order to move on? If he did, he'd be stuck. The NFL's Anti-Tampering Policy states that "an employee under contract to a member club ... who voluntarily resigns or retires prior to the expiration of his contract, is not free to discuss or accept employment with another NFL club without the consent of the prior-employer club."

That's what happened in the cases of Vermeil and Marty Schottenheimer, who essentially "retired" only later to be lured back by a coaching offer. In both instances, their old clubs received compensation because they were still under contract.

In Harbaugh's case, it's tough to imagine the 49ers commanding the type of package the Raiders once got for Gruden. The wunderkind coach established himself in Oakland by going 40-28 (including playoffs) and winning back-to-back AFC West Division titles over his final two seasons. Like Harbaugh, he had resurrected a once-proud franchise: When the Raiders went 12-4 in 2000, they captured their first division title since 1990.

Gruden got a five-year deal from the Bucs that paid him almost $4 million a season, more than tripling his Oakland salary. Gruden promptly became the youngest coach at the time ever to win a Super Bowl, leading the Bucs over the Raiders at age 39 years, 5 months and 9 days.

Charley Casserly, the former NFL executive for Washington and Houston, once ventured that the value of a top-tier NFL coach was at least two No. 1 picks. In a piece he wrote for in 2013, he put it this way: "Would you rather have a young franchise quarterback like Andrew Luck or Bill Belichick. ... Personally, I would pass on the star quarterback and take the top-tier coach ... With the salary cap inching up by small amounts each year, the value of an excellent coach only increases."

NFL teams, including the Raiders, might be ready to pounce, but the timeline gets tricky. The "Rooney Rule" requires teams to interview at least one minority candidate. If another team hires Harbaugh within a day or two after the season, it would, in the words of Florio, make "a mockery of the Rooney Rule."

Even without the Rooney Rule, league policy prohibits getting a head start. Another facet of the NFL's Anti-Tampering Policy is that until after the final game of the season:

* No head coach may discuss or accept employment for the current or a future season with another club in the league.

* No club may request permission to discuss employment with a head coach for the current or a future season.

* No employer club may grant another club permission to discuss employment with its head coach for the current or a future season.

As the 49ers stagger toward their final game, no one is bothering to pretend that Harbaugh will be back. Even the normally feisty coach has sounded increasingly resigned in recent weeks. At his news conference Monday, he sounded at peace: "What will happen, will happen,'' he said.

Edwards, the former Jets and Chiefs coach, is mystified that it's come to such an unhappy ending. But he said that York has to do what's in the best interest of the franchise.

"Harbaugh will continue to be a great coach,'' Edwards said. "But this is something we tell players all the time when we (part ways with them), 'Hey, you're going to be a good player. But you don't fit in this system, and in this philosophy right now.'"