SAN FRANCISCO — Catcher Nick Hundley has agreed to a $2.5 million, one-year contract to remain with the Giants.

“We are glad to welcome Nick back to the Giants,” General Manager Bobby Evans said in a statement. “We appreciated his contributions last year and we look forward to him wearing a Giants uniform again in 2018.”

The 34-year-old hit .244 with nine homers and 35 RBIs in 303 plate appearances last season. Of his 70 hits, 32 were for extra bases, including a career-high 23 doubles. While he struggled at home, hitting .214, he hit .272 on the road.

He threw out 13 of 49 runners attempting to steal. Serving primarily as Buster Posey’s backup, he made 65 starts at catcher.

He won the Willie Mac Award last season, which is the team’s most inspirational player award, as voted on by the Giants players, coaches, training staff and the team’s fans.

The Giants finished last in the National League West at 64-98 last season.

“We have a lot to prove,” he told MLB.com. “The challenge of going from last place to first place is an immense challenge. But it’s definitely a worthy cause.”

He has a .249 career average with 81 homers and 340 RBIs. He has also played for the Padres, Orioles and Rockies in his 10-year career.

Hundley became a free agent after the season. San Francisco announced the agreement Tuesday.