T.J. McConnell has agreed to a two-year, $7 million deal with the Indiana Pacers, the point guard’s agent confirmed Wednesday.

McConnell, 27, who was the longest-tenured player on the 76ers and a fan favorite from the Process era, spent four years with the Sixers after going undrafted out of Arizona.

Arguably the most liked member of the Sixers, McConnell, a Pittsburgh native, formed close friendships with most of his teammates and head coach Brett Brown through the years.

A representative of the “grind from the bottom” persona the Sixers cultivated over the years, McConnell was the recipient of many ovations and chants at the Wells Fargo Center. His tenacity, especially when creating turnovers after picking up players full-court on defense, created rallying moments for Sixers fans.

He has career averages of 6.4 points and 4.7 assists per game.

With the rebuilding 2016-17 Sixers, McConnell played in 81 games, starting in 51 of them. He saw his role diminish as the Sixers’ expectations rose the following season, and more so last season.

With the free-agent signings and re-signings the Sixers have made, the team would not have had the resources to sign McConnell to another contract, especially considering the lack of playing time they would have been able to offer him.

With McConnell coming off a $1.6 million year with the Sixers, the Pacers contract is a significant raise for the reserve guard.

McConnell joins a Pacers squad that already added point guard Malcolm Brogdon during free agency, but he’ll likely have an opportunity to compete for reserve minutes.