Former Philadelphia Phillies star Ryan Howard announced his retirement from baseball in a letter posted Tuesday on The Players’ Tribune website.

Howard, 38, has not played in the majors since 2016 and has been a free agent since November. The former National League MVP signed minor league deals with the Atlanta Braves and Colorado Rockies last season, but his entire major league career was spent with the Phillies.

In the Players’ Tribune piece titled, “Thank You, Philly,” Howard reminisced about some of his most memorable moments during his 13 seasons with the Phillies. The three-time All-Star noted “some interesting bookends” in his career, which he called “a wild ride.”

“I’m glad that I got to stay on it for as long as I did,” Howard wrote. “Which I guess has really also kind of become my overall perspective on things: How, when it’s come to these last 14 years of mine — nothing has ever been easy for long, and nothing has ever been perfect for long.

“But I wouldn’t have it any other way.”

Howard was a career .258 hitter with 382 home runs and 1,194 RBIs in his 13 seasons with the Phillies. He twice led the majors in homers and led the majors in RBIs three times during a dominant six-year stretch from 2006 to 2011, when he averaged 44 homers and 133 RBIs per season.

Howard burst into the majors as a rookie in 2005, when he had 22 home runs and 63 RBIs in just 88 games en route to being named the NL Rookie of the Year. He was voted MVP the following season, when he led the majors with 58 homers and 149 RBIs.

Howard again led the majors in homers (48) and RBIs (146) in 2008, while helping the Phillies win their first World Series title since 1980.

But his career took a downturn in 2011 when he suffered a torn Achilles on the final play of the NLDS. The next five years of his career were plagued by knee, foot and Achilles injuries.