A Florida teenager who masterminded the Twitter hack of prominent accounts like Bill Gates and Barack Obama last summer was sentenced to three years in prison and three years of probation this week. 

Graham Ivan Clark, who was 17 at the time of the hack but is 18 now, pleaded guilty to 30 felony charges as part of a plea deal, authorities announced. 

Prosecutors say Clark and his co-conspirators hacked into numerous Twitter accounts, including politicians like Barack Obama and Mike Bloomberg; business leaders like Elon Musk and Bill Gates; and celebrities like Kanye West and Kim Kardashian. 

Twitter explained that the hackers "targeted a small number of employees through a phone spear phishing attack," which allowed them to "obtain access to both our internal network as well as specific employee credentials that granted them access to our internal support tools."

BAD GUYS WILL TRY TO SNAG THIRD STIMULUS CHECK PAYMENTS, SAYS GOVERNMENT

Clark then sent out bogus tweets from the hacked accounts, telling followers that they would send $2,000 in Bitcoin for every $1,000 that was sent to an anonymous address. 

The scam netted Clark 12.86 Bitcoin on July 15 of last year, which was worth approximately $117,440 at the time. 

"He took over the accounts of famous people, but the money he stole came from regular, hard-working people. Graham Clark needs to be held accountable for that crime, and other potential scammers out there need to see the consequences," Hillsborough State Attorney Andrew Warren said Tuesday.

"In this case, we’ve been able to deliver those consequences while recognizing that our goal with any child, whenever possible, is to have them learn their lesson without destroying their future."

CLICK HERE TO GET THE FOX NEWS APP

Clark and two other people allegedly involved in the hack -- Mason Sheppard, 19, of the United Kingdom, and Nima Fazeli, 22, of Orlando -- were identified and charged just two weeks after the crime when federal agents tracked them down through their bitcoin transactions and online chats. 

The Associated Press contributed to this report.