Shortstop Brandon Crawford announced he was retiring from baseball Wednesday after a 14-year career in which he made three All-Star teams and won two World Series championships with the San Francisco Giants.

"Baseball has been a part of my life for as long as I can remember, and for the rest of my life I will be thankful for the opportunities and experiences it has given me," Crawford wrote in an Instagram post. "Time is precious. I'm incredibly grateful for all the years I spent playing the game I love, but now it is time for me to spend it with the people who I'm most thankful for.

"Thank you to all of you who have [been] there for me throughout the years. It's been an unbelievable ride."

A native of Mountain View, California, in the San Francisco Bay Area, Crawford, 37, played for the St. Louis Cardinals last season after spending the first 13 years of his career with the Giants, who selected the UCLA product in the fourth round of the 2008 draft. St. Louis released him on Aug. 20 after he hit just .169 in 28 games.

Crawford helped the Giants win titles in 2012 -- his second season in the majors -- and in 2014. His first of three All-Star selections came in 2015, when he hit .256 with 21 home runs and 84 RBIs.

Crawford's best season might have come in 2021, when he had career bests in batting average (.298), home runs (24), RBIs (90) and stolen bases (11). He won the last of his four Gold Gloves that season and also finished fourth in the NL MVP voting.

"I always dreamed of playing for the San Francisco Giants," Crawford wrote in his post. "Being drafted by my hometown team and spending most of my career with them far surpassed any dream I had as a kid."