Katie Ledecky is turning pro.

The five-time Olympic gold medalist announced on Twitter that she is giving up her final two years of eligibility at Stanford. She’ll keep training at the West Coast school while working toward her degree.

READ MORE: Baltimore Police Officer Dragged By Vehicle In Northwest Baltimore

The 21-year-old Ledecky helped Stanford capture a pair of women’s national championships, the first back-to-back titles since winning five straight from 1992-96.

Ledecky wrote on Twitter that she’s excited to turn pro. She thanked the Cardinal program for “two amazing seasons” and saluted her family, friends and fans.

READ MORE: At Least 5 Shootings In Baltimore Since Monday; Harrison Weighs In On Mosby Prosecution Policy

The decision to turn pro allows Ledecky to cash in on sponsorship and endorsement deals ahead of next year’s world championships in South Korea and the 2020 Olympics in Tokyo.

Ledecky was among the biggest stars at the 2016 Rio Olympics, winning four golds and a relay silver.

Follow @CBSBaltimore on Twitter and like WJZ-TV | CBS Baltimore on Facebook

MORE NEWS: Baltimore City Councilmembers Pledge To Protect Women's Rights Following Supreme Court Ruling

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)