Kyle Juszczyk scored touchdown after touchdown as the 49ers’ hellacious 2020 lurched toward a merciful end. All due respect to his proficiency as a lead blocker, here was the offensive weapon most envisioned upon his arrival in 2017.

The 49ers have anted up again to retain “Juice’s” versatility.

Juszczyk agreed to re-sign Sunday, a day away from officially testing the free agent market. His five-year deal is worth $27 million, a league source said.

“So incredibly thankful to be a part of this organization for 5 more years!” Juszczyk posted on his Instagram account. “Thank you Faithful for the continuous support! Looking forward to showing that the juice is always worth the squeeze.”

The 49ers did not immediately confirm the deal, other than CEO Jed York’s congratulatory and explanatory tweet: “So fired up Juice! Had to be the coherent FaceTime from us last night that sealed the deal.”

Those Saturday night shenanigans presumably included general manager John Lynch, who teased the deal publicly,  tweeting at 9:45 p.m.: “I’m thirsty. Niner fans, you want some ‘Juice?’ ”

The confirmation of a deal came Sunday afternoon by NFL Network’s Ian Rapoport and Juszczyk’s agent, Joe Linta.

The 49ers entered Sunday with some $30 million in salary cap space, so this deal will dip into that some and cause ripple effects for their other pending free agents. It’s a 28-man class headlined by left tackle Trent Williams, who blocked the 49ers from using the franchise tag on him and expressed curiosity to test the market.

Other pending free agents include defensive linemen Kerry Hyder Jr. and Solomon Thomas; safety Jaquiski Tartt; wide receivers Kendrick Bourne and Trent Taylor; and, cornerbacks Richard Sherman, Jason Verrett, K’Waun Williams and Ahkello Witherspoon.

Teams can begin negotiating with others’ free agents Monday, with signings allowed to start Wednesday, unless they’re re-signing their own players, as in the 49ers’ case with Juszczyk.

“It is tough to imagine being in a different offense that would utilize me the way I am here,” Juszczyk said Jan. 4, amid an emotional exit interview with reporters a day after the season. “The way Kyle and Mike McDaniel have done such a great job finding ways to put me in situations to succeed.

“I owe them so much for the opportunities they’ve given me the past four years.”

Four years ago, the 49ers made Juszczyk the NFL’s highest-paid fullback with a $21 million deal. He responded with four consecutive years of Pro Bowl-caliber play and durability, the latter of which has been a rare commodity among his 49ers teammates.

Amid last season’s injury carnage inflicted upon running backs and so many other positions, Juszczyk produced a career-high six touchdowns, with four coming in the final five games. He had two touchdown catches in their Week 16 win over Arizona.

Playing every game and 43 percent of their offensive snaps last year, Juszczyk responded with a career-high 17 carries (64 yards) and two touchdowns, plus four receiving touchdowns among his 19 catches (202 yards).

His number got called more near the goal line and in short-yardage situations. It is his lead blocking, however, that is most critical to a run-oriented offense that often races wide in the zone scheme.

Although not many teams employ fullbacks, Juszczyk, 29, promoted himself at season’s end as a unique asset that could benefit any offense. The New York Jets’ figured to be in play, not only because Juszczyk has an East Coast home in the offseason, but the Jets are installing a 49ers-esque scheme under new coach Robert Saleh and offensive coordinator Mike LaFleur, former 49ers assistants.

Juszczyk anticipated this potential free agency cyle being different than his 2017 journey, which took him away from the Balitmore Ravens. “I was 25 my first time, I wasn’t engaged yet. There were a lot of different family dynamics that come into play,” Juszczyk said. “I’m married and want to start a family soon. I definitely want to be on a team that’s a contender.”

“I’ve been on a Super Bowl team and 4-12 team. That Super Bowl contending team was a lot more fun.”