The Phillies traded Freddy Galvis on Friday afternoon to San Diego as they moved their longest tenured player in order to create an opening at shortstop for J.P. Crawford.

The Phillies received Enyel De Los Santos, a 21-year-old righthander who made 24 starts last season in double A. Galvis, 28, had been with the team since 2012. Cesar Hernandez, who became friends with Galvis when they were 13 and signed with the Phillies on the same day, is now the team's longest tenure player.

De Los Santos had a 3.78 ERA last season in 24 starts. He struck out 138 batters and walked 48 in 150 innings. The Padres acquired De Los Santos in 2015 by trading Joaquin Benoit, who pitched last season for the Phillies, to Seattle.

Galvis batted .255 this season with a .309 on-base percentage. He finished as a Gold Glove finalist for the second-straight year. He appeared in every game last season and was a positive influence in the clubhouse. Galvis is a free agent after the season.

Crawford, who reached the majors in September, should give the Phillies better offensive production at shortstop while coming close to matching Galvis' defense. Crawford had a .342 on-base percentage in 810 triple-A at-bats. He may not yet be as smooth a fielder as Galvis, but Crawford flashed promise in the minors.

It was almost a certainty this offseason that the Phillies would trade either Galvis or Hernandez. Crawford is seen as the team's shortstop of the future while Hernandez is being pushed at second base by Scott Kingery, who will reach the majors this season. The Phillies will keep Kingery in the minors for at least the first six weeks of the season to delay his eventual free agency by a season. The Phillies can start the year with Crawford at short and Hernandez at second and then move Hernandez to a utility role when Kingery arrives.