NEW YORK — The Mets signed second baseman Joe Panik on Friday before their series opener against the wild card-leading Washington Nationals, a homecoming for the New York native.

Born about twenty miles north of Citi Field in Yonkers, Panik lived in suburban Dutchess County and attended John Jay High School in the hamlet of Hopewell Junction. He played college baseball for St. John's not far from his new team's Queens stadium

"It couldn't have worked out any better for myself, personally, a lot of family, a lot of friends in the area," Panik said. "For me to be coming to a club that's hot right now... It's very exciting. For me, it's a great situation."

Panik actually played at Citi Field before the big league club took the field for the first time.

"Yeah, actually, back in 2009 when Citi Field first opened I was a freshman at St. John's and the first game, before the Mets opened up, St. John's, we played Georgetown," Panik recalled. "That was the first game ever here."

The 28-year-old Panik was designated for assignment by San Francisco this week and later released. The Giants selected him in the first round of the 2011 draft, and the former Gold Glove winner played a key role during the club's 2014 World Series run.

"I think what we have in that clubhouse is something very special. There's chemistry," general manager Brodie Van Wagenen said. "Any player that we were going to bring into this clubhouse, we wanted to make sure that he fit in."

An All-Star in 2015, Panik hit .271 with 36 home runs and 221 RBIs in six seasons with San Francisco. He has struggled this year, batting just .235 with a career-low .627 OPS in 103 games.

He flied out in his first at-bat with New York on Friday night.

"You just don't know what to expect when something like this happens. For me, it's the first time in my career being DFA'd and changing teams," Panik said. "I've been with the same organization since 2011 so it's a lot of excitement right now."

Panik fills a significant void, with everyday second baseman Robinson Canó out with a torn left hamstring. There is no timetable for Canó's return, and he could miss the rest of the season.

"He's been in big situations and a guy that's been in the World Series. He knows how to play this game," Canó said about Panik. "I think he's a guy that's going to contribute to this season."

To make room, the Mets designated Adeiny Hechavarría for assignment. The veteran infielder was hitting .204 with five homers and 18 RBIs in 60 games, seeing time at second, third and shortstop.

"It's a tough decision. Hech has been here. He's got great defensive skills," manager Mickey Callaway said. "We feel that (Luis) Guillorme does as well, so it came down to a few factors that we feel is just a baseball decision. It's always a tough one and we hope that he somehow ends up staying our organization."

Panik wore No. 2 and batted eighth against Washington.

"Honestly, just being part of a New York team in a push. I know how much excitement there is here. You can feel it," Panik said. "All my family and friends are all excited about what's going on with the Mets. For me it's going to be exciting to go out there."