Serena Williams will not play in the U.S. Open because of an injury, she said Wednesday.

“After careful consideration and following the advice of my doctors and medical team, I have decided to withdraw from the US Open to allow my body to heal completely from a torn hamstring,” Williams told her 13.5 million followers on Instagram.

“New York is one of the most exciting cities in the world and one of my favorite places to play — I’ll miss seeing the fans but will be cheering everyone on from afar,” Williams added. “Thank you for your continued support and love. I’ll see you soon.”

Williams, 39, stopped playing her first-round match at Wimbledon in June during the first set after she slipped on the grass court during a point and hurt her leg. She did not compete in the Olympics in Tokyo.

With 23 Grand Slam singles titles, Williams holds the record for the most of any female player in the open era. She has won six of those titles at the U.S. Open.

She is not the first tennis star to withdraw from the tournament. Rafael Nadal, 35, and Roger Federer, 40, both ended their seasons when they pulled out of the U.S. Open earlier this month. Nadal, Federer and Novak Djokovic are all tied with 20 Grand Slam titles.