49ers’ Marquise Goodwin signs 3-year extension after...

1of 3FILE - In this Dec. 31, 2017, file photo, San Francisco 49ers wide receiver Marquise Goodwin gestures as he comes onto the field before an NFL football game against the Los Angeles Rams, Sunday,, in Los Angeles. The 49ers have signed Goodwin to a three-year contract extension, Thursday, March 8, 2018. NFL Network reported that Goodwin's new contract is worth $20.3 million with $10 million in guarantees. (AP Photo/Rick Scuteri, File)Photo: Rick Scuteri, Associated Press

3of 3San Francisco 49ers' Marquise Goodwin walks off the field after warming up before Niners play Carolina Panthers in NFL game at Levi's Stadium in Santa Clara, Calif., on Sunday, September 10, 2017.Photo: Scott Strazzante, The Chronicle

Wide receiver Marquise Goodwin has cashed in after a career-best season.

A year after signing a relatively modest two-year deal with the 49ers, Goodwin, 27, signed a three-year contract extension Thursday that runs through the 2021 season. The deal is worth $20.3 million with $10 million in guarantees, NFL Network reported.

Goodwin, who had a $1.95 million base salary last year, earned his raise after posting career bests in receptions (56) and receiving yards (962), and ranking third in the NFL in yards per reception (17.2).

In his first four seasons, all with the Bills, the 2013 third-round pick managed just 49 catches for 780 yards and missed 25 games with injuries. Goodwin, a former Olympic long jumper who is among the NFL’s fastest players, was used primarily as a deep threat in Buffalo.

On Thursday, he said the 49ers’ ability to see his potential as a multidimensional receiver might have saved his career.

“I’m really blessed and fortunate because it could have all ended after Buffalo,” Goodwin said. “Or I could have been in a worse situation and not had this year to have a solid season. A lot of things could have gone wrong.”

The 49ers’ investment and confidence in Goodwin, along with the presence of wideouts Pierre Garcon and Trent Taylor, could signal they aren’t poised to make major moves at the position in free agency. Jacksonville’s Allen Robinson and the Rams’ Sammy Watkins are expected to be among the top free-agent wide receivers.

In 2017, Goodwin made it clear he was part of the 49ers’ long-term future amid a season that included personal tragedy.

His wife, Morgan, had to deliver their stillborn son at 19 weeks because of complications early in the morning of Nov. 12. He played that afternoon and caught an 83-yard touchdown pass against the Giants as the 49ers got their first win after an 0-9 start. A month later, Goodwin revealed his father had died a few days before he had his second consecutive 100-yard performance in a win over the Titans.

After the season, Goodwin won the team’s Len Eshmont Award, which is voted on by players and given to the teammate who best exemplifies inspiration and courage. He also won the Ed Block Courage Award.

“From the minute Marquise joined our team, he has shown us everything we want to see in a 49er,” general manager John Lynch said. “He leads by example with a tremendous work ethic, a trait that helped him expand his repertoire as a football player and post his most successful season as a pro last year.”

Goodwin is a world-class athlete. He has the fifth-fastest 40-yard dash (4.27 seconds) at the NFL combine and finished 10th in the long jump at the 2012 Olympics. Prior to the Olympics, he became the first collegian to win the long jump at the Olympic trials and the NCAA outdoor meet in the same year since 1960.

Last year, his elite skills were on full display after quarterback Jimmy Garoppolo entered the starting lineup.

In Garoppolo’s five starts, Goodwin had 29 catches for 384 yards. During that stretch, he had the two highest single-game catch totals (10, eight) of his 55-game career and two of his four 100-yard performances.

Goodwin’s season ended on a scary note when he sustained his second concussion of the season and at least the fourth of his NFL career on a helmet-to-helmet hit that left him momentarily unconscious in the season finale against the Rams. Goodwin’s arms initially splayed when he took the shot from safety Blake Countess.

Goodwin reportedly has been placed in the NFL’s concussion protocol on six occasions since 2014. In October, however, Goodwin told The Chronicle he’d had only three concussions in the NFL. He said his natural sensitivity to light had placed him in the concussion protocol twice in 2016 when he was with the Bills.

On Thursday, Goodwin said his concussion against the Rams didn’t make him “scared” about his career possibly being over.

“I was not scared at all, by any means,” Goodwin said. “I know the game I play is tough, it’s physical, and things like that happen at some point. But I think the people in the stands were more scared than I was, I guess from how it looked and me being unconscious for a few seconds.”

On Jan. 2, two days after Goodwin’s latest concussion, Lynch said the 49ers weren’t concerned about the “career effects” of his head injuries.

“I think Marquise has been sensitive about that before, that however many have been reported are (not) actually the case,” Lynch said. “We’ve looked into that.”

Eric Branch has worked at the San Francisco Chronicle since 2011 as the 49ers beat writer. Before that, he covered the 49ers for the Santa Rosa Press Democrat in 2010. Since he began his career in journalism in 1997 in Logansport, Ind., he’s covered events ranging from archery tournaments to the NCAA Men’s Basketball Tournament.