Lindsay H. Jones

USA TODAY Sports

After resurrecting the San Francisco 49ers and taking the team to three NFC championship games and one Super Bowl appearance in four years, the Jim Harbaugh era in San Francisco is over.

The 49ers and Harbaugh "mutually agreed to part ways" the team announced Sunday after the team's 20-17 win over the Arizona Cardinals.

The Niners ended the season 8-8 and out of the playoffs, the only year since Harbaugh was hired in 2011 that the team failed to reach the postseason. Harbaugh leaves the Niners with a career record of 44-19-1, along with a 5-3 record in the postseason.

"Jim and I have come to the conclusion that it is in our mutual best interest to move in different directions," said 49ers CEO Jed York in a release. "We thank Jim for bringing a tremendous competitive nature and a great passion for the game to the 49ers. He and his staff restored a winning culture that has been the standard for our franchise throughout its history. Their commitment and hard work resulted in a period of success that should be looked back on proudly by our organization and our fans. We wish Jim and his family all the best."

But this was hardly a surprising result, with the Niners and Harbaugh heading for divorce all year as the coach clashed with general manager Trent Baalke and rumors swirled that he was losing support within the locker room.

The team looked into trading Harbaugh to the Cleveland Browns last spring, and San Francisco did not sign Harbaugh to a contract extension before the 2014 season. Perhaps only a Super Bowl title this year could have prolonged Harbaugh's time in Santa Clara.

Instead, the 49ers spent the season shrouded in controversy, both on and off the field.

The offseason started with the Browns trade story, and it included the hold outs of two prominent players, tight end Vernon Davis and guard Alex Boone; a sexual assault investigation into quarterback Colin Kaepernick, from which he was ultimately cleared; and a guilty plea by star pass rusher Aldon Smith on drunken driving and weapons charges that resulted in a nine-game suspension.

But the problems persisted into the regular season, with a three-game losing streak in September and another four-game losing streak that started with a Thanksgiving night loss to rival Seattle that ended the Niners' playoff hopes.

"For the last four seasons I have had the great privilege to coach one of the storied franchises in the history of football," Harbaugh said. "We accomplished many great things together as a team during this period, which is a tribute to the incredible efforts of some of the most dedicated players and coaches in the NFL.

"I will miss competing alongside this group of players and coaches, I have the utmost respect and admiration for their hard work and support. It has been my honor to share the sideline with these mighty men. I will always appreciate and remember fondly, the passion and support of our Faithful fans, and want to express my particular thanks to them."

San Francisco's offense struggled to find an identity all season and often – and controversially -- abandoned the power-running style that had defined the Niners for much of the Harbaugh era. But Kaepernick, who received a contract extension in June, failed to improve and the Niners failed to score, finishing ranked near the bottom of the NFL in points scored.

The defense had its problems, too, in part because issues at linebacker, with the season-long absence of star linebacker NaVorro Bowman, the lack of a pass rush without Smith (and his negligible impact once he returned) and a season-ending injury to Patrick Willis in October.

San Francisco also dealt with season-long off-field drama with defensive end Ray McDonald, arrested on suspicion of domestic violence on Aug. 31. McDonald remained in the starting lineup while police and prosecutors investigated that case, and he was ultimately not charged. But the team released him earlier this month, hours after police named him as a suspect in a sexual assault investigation.

San Francisco immediately becomes perhaps the most intriguing job opening in the NFL, because of Kaepernick and a quality defensive roster. The Niners next head coach will be charged with continuing Kaepernick's development and reshaping San Francisco's offensive identity.

"We are now squarely focused on finding the next head coach of the 49ers and I am very confident in Trent's ability to lead that process," York said. "With the great leaders and talented players we have in our locker room, we are ready to move into the next chapter of our team's history."