Andres Torres is heading back to the organization where he enjoyed his greatest success.
Torres has agreed to a one-year deal with the San Francisco Giants, pending a physical, the team announced Thursday.
Pagan helped lead San Francisco to its second World Series title in three years this past season, while Torres and Ramirez were busts with the Mets.
Torres was non-tendered by the Mets last month after hitting .230 with three homers and 35 RBIs in 374 at-bats while earning $2.7 million in 2012. Ramirez is now a free agent.
Pagan re-signed with San Francisco for a four-year contract worth $40 million.