Shortstop Jack Wilson and right-hander Ian Snell were traded to the Mariners earlier Wednesday for five players.
Alderson was ranked as the Giants' fourth-best prospect coming into the season and had gone 7-2 with a 3.65 ERA and 66 strikeouts in 18 starts combined for Class A San Jose and Double-A Connecticut.
"We gave up a good prospect," Giants general manager Brian Sabean said during an impromptu press conference with Sanchez dressed in a Giants uniform. "But that's the price of doing business.
Alderson was the 22nd overall pick in the 2007 First-Year Player Draft by the Giants.
"We are pleased to bring in a pitcher as highly regarded as Alderson into our system," Pirates general manager Neal Huntington said. "Tim has the size, frame, athleticism and an advanced feel for pitching at his age to become a high quality Major League starting pitcher. He has a solid arsenal of pitches with plus command that has allowed him to move through the Giants' deep system at an accelerated pace."
Sanchez leaves after making one last effort to stay in Pittsburgh. He asked his agents to present the Pirates with a three-year, $20 million extension counteroffer on Tuesday night in hopes that he could stay with the organization. That counteroffer was rejected by the Pirates on Wednesday morning.
While Sanchez and Wilson had hoped to stay teammates beyond this season, though the now former Pirates second baseman said he saw the writing on the wall immediately after watching Wilson say his goodbyes in the AT&T Park clubhouse earlier in the day.
"Seeing him go made it a lot less emotional for me to come over here," Sanchez said. "He was my double-play partner the last few years and my best friend. Definitely when he left, I think it made it a little easier to hear the news about coming over [to the Giants]."
Jenifer Langosch is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.