SANTA CLARA >> Bring on Brandon Aiyuk.

After sitting out training camp practices and the preseason, after requesting and rebuffing trade proposals, after stoically observing from the sidelines, Aiyuk is ready to join the 49ers’ on-field preparation that ideally will yield their first Lombardi Trophy in 30 years.

Three hours after they practiced yet again without him, the 49ers reached a four-year, $120 million extension with Aiyuk on Thursday, a league source confirmed. NFL Network first reported the deal, which includes $76 million guaranteed.

Aiyuk’s months-long angst is over after social media outcries, a seemingly soft trade request, and an extended “hold-in” at camp. Those are not major factors that earned him a contract extension from the 49ers.

The booming market made time and pay grades for Aiyuk’s place. Yet it was his on-field excellence that got the 49ers’ star wide receiver a much-deserved raise.

Teammates hoped for such a resolution with the Sept. 9 regular-season opener approaching, although the 49ers still have to settle left tackle Trent Williams’ contract holdout.

On Wednesday, general manager John Lynch and coach Kyle Shanahan hoped Aiyuk would begin practicing as they revealed he’d been medically cleared, after citing back and neck issues kept him off the field amid his training camp “hold-in.”

“John and Kyle and the owners know what they’re doing, so hopefully they get it resolved soon and we can get this season pushing to have a great year,” cornerback Charvarius Ward said roughly three hours before news broke of Aiyuk’s deal.

After an up-and-down start to his career as a 2020 first-round draft pick, Aiyuk led the 49ers with 1,015 yards and 1,342 yards the past two seasons, respectively. The 49ers hadn’t seen back-to-back 1,000-yard seasons from a receiver since Anquan Boldin (2013-14).

Now Aiyuk gets his shot this year at joining Jerry Rice and Terrell Owens as the only receivers in 49ers history with three straight 1,000-yard seasons, though Rice’s run was 11 years and Owens’ four.

The 49ers’ biggest personnel drama this offseason, at least publicly, was Aiyuk’s status. Prior to the extension, he was set to play out the final year of his rookie contract for $14.1 million.

“At some point, you have to play,” Lynch said Wednesday without getting into specifics about the extensive contract talks.

Aiyuk accepted the same deal the 49ers offered two weeks ago, ESPN’s Adam Schefter reported, though Aiyuk’s agent Ryan Williams disputed that notion. In late July, the 49ers were offering over $27 million annually, and now Aiyuk will receive $47 million before April 1, according to NFL Network’s Ian Rapoport.

So, no hard feelings after a tumultuous time away from the team?

“As soon as they walk in the doors, it doesn’t matter what everyone is getting paid,” center Jake Brendel said. “We’re all football players. We’re all here to get one thing done, and that’s win games. Within the building, everyone is still on the same page as we were for however many years we’ve been here. We just want exactly what we did last season, but with just one more win.”

A week before training camp, Aiyuk’s camp went public with a trade request. Aiyuk reported to Santa Clara with his teammates but did not practice on Day 1 of training camp. With Aiyuk’s deal done, the 49ers now will turn to the 36-year-old Williams, whose agent has been having under-the-radar talks with the club.

Aiyuk thus joins an annual parade of homegrown stars who’ve been rewarded beyond their initial contracts, a club that includes Samuel, tight end George Kittle, linebacker Fred Warner, and defensive end Nick Bosa.

A slew of NFL wide receivers also scored extensions this offseason, topped by the historic pact Justin Jefferson signed with the Minnesota Vikings (four years, $140 million; $110 million guaranteed). Jefferson’s $35 million average per year surpassed Bosa by $1 million for the NFL’s highest among non-quarterbacks. Dallas’ recent deal with CeeDee Lamb also put him in that stratosphere ($34 million annually).

The 49ers previously invested in their receiver corps this offseason by drafting Ricky Pearsall with their first-round pick and extending Jauan Jennings to a two-year, $15.4 million extension during May’s organized team activities.