The best transactions, whether they’re in business or in sports, are those that benefit all parties involved.

In that respect, the chain of events in which football coach Jeff Hafley abruptly left Boston College and was replaced by Bill O’Brien, fits that description.

The 2 transactions might not have been directly related, as it would have been had it been 1-for-1 trade. But the end result is the same.

It’s a win-win situation for everyone.

Hafley wins by taking himself off the hot seat, returning to the NFL and maintaining a comparable salary by becoming the Green Bay Packers’ new defensive coordinator. O’Brien wins by getting another shot at being a head coach, just when it seemed as though he’d have to work his way back through the ranks as an assistant.

BC, meanwhile, might just turn out to be the biggest winner of them all. By exchanging O’Brien for Hafley, the Eagles significantly upgraded their leadership as they continue to search for a way off their perpetual 6-7 win treadmill.

Other than a pair of 3-win hiccups in 2015 and 2 seasons ago, BC has won either 6 or 7 games every year since 2013.

Hafley can talk all he likes about growing tired of off-the-field factors such as name, image and likeness, the transfer portal and conference realignment concerns.

And he has at length since leaving the college game for the NFL, creating a panicked narrative that more coaches will follow his lead or simply leave the game.

But the unspoken factor weighing on his decision is that even after improving by 4 wins and earning a victory in the Fenway Bowl, Hafley would still have been very much in jeopardy had he stayed for a 5th season with the Eagles.

He was just 22-26 at BC, 12-22 in the ACC. Had he stayed, he’d have been in a similar situation in 2024 to the one faced by Syracuse’s Dino Babers in 2023.

Show even more progress or they’ll find someone else who can.

By getting out of Dodge before the posse caught up to him, Hafley took the middleman out of the process and allowed athletic director Blake James to hire someone who – at least based on his resume – has a realistic shot of doing the job better.

O’Brien certainly checks all the right boxes.

He’s got head coaching experience, both at the NFL and college level. He’s served as an assistant under Nick Saban at Alabama and Bill Belichick with the New England Patriots – 2 of the best ever. He is a Boston native with strong ties to the area and an understanding of BC’s history, tradition and limitations.

And he’s hungry to have a shot at running a program free from the handcuffing obstacles that caused him to leave his 1st college job after only 2 seasons.

O’Brien had the misfortune of being the man who followed The Man at Penn State following the scandal that sent assistant coach Jerry Sandusky to jail and Nittany Lion icon Joe Paterno out to pasture in 2011.

That in itself would have made the job challenging enough. But the NCAA added to the degree of difficulty by slapping harsh sanctions on the program – including a 4-year postseason ban and the loss of 40 scholarships over that same period.

O’Brien made the best of the situation by going 8-4 that 1st year, a result that earned him Big Ten Coach of the Year honors. But when the sanctions began to take their toll and his team slipped to 7-5 the following season, he read the handwriting on the wall and bolted for the NFL.

That gives him something in common with Hafley.

But his predecessor at BC isn’t the only coach with whom he shares a similarity.

Much like newly hired Manny Diaz at Duke, O’Brien has been provided with an opportunity to rehabilitate his reputation after getting fired from his last head coaching job. Despite having a winning overall record.

And he’ll have the opportunity to do it under much less scrutiny than some of his previous stops.

Boston is decidedly pro town. Because of that, BC is barely a blip on the radar – let alone the sports pages and talk radio shows preoccupied with what the Red Sox, Patriots, Celtics and Bruins are doing.

He won’t have to deal with overly demanding fans like those at Alabama who held him responsible for not winning a national championship during his 2 seasons as offensive coordinator there. Even though the Crimson Tide went 24-4, averaged better than 40 points per game and produced a Heisman Trophy winner in Bryce Young.

It’s an opportunity so attractive that it was worth leaving Ohio State, where O’Brien had just been hired as OC, only 2 months after arriving.

The only downside is that he’ll be starting at a disadvantage to his competitors in the ACC because of the timing of his hiring. He’ll have only a few weeks to evaluate his roster and prepare for his 1st spring practice, then begin the process of recruiting transfers to fill the holes once the portal reopens in April.

He’ll at least have the advantage of a veteran quarterback around which to build. Dual-threat playmaker Thomas Castellanos already announced his intention to stay shortly after Hafley’s departure. And BC returns 80% of its defensive production from last season, according to rankings compiled by Bill Connelly of ESPN.

But O’Brien’s hiring isn’t meant to be a short-term fix. While there’s always the chance he’ll use this job as a stepping stone to get back to a higher-profile program, his background and personality would seem to make him a natural fit for BC.

Even his name gives off positive vibes.

The last O’Brien to serve as the Eagles coach, Tom, stayed 10 seasons in Chestnut Hill. He went 75-45, winning a Big East championship before winning an Atlantic Division title in BC’s 1st year in the ACC.

This O’Brien would love to recreate that kind of success. But the bar, at least in the short term, is significantly lower.

Before he can get the Eagles onto the road toward a championship, he’ll first have to get them off the treadmill on which it’s been stuck for the past 11 years.