Paxton Smith was making the speech as the valedictorian at her Texas school, Lake Highlands High School.
Her speech, which set out to discuss how the media and TV have shaped her worldview, was signed off by the school’s administrators.
But when delivering the address at the graduation ceremony, the student instead criticised the state’s strict abortion laws that constitute a near-total ban.
The unexpected change has been widely praised and viewed over 4.7 million times on Twitter.
Smith began: “Under light of recent events, it feels wrong to talk about anything but what is currently affecting me and millions of other women in this state.
“Recently, the ‘heartbeat bill’ was passed in Texas. Starting in September, there will be a ban on abortions after six weeks of pregnancy, regardless of whether the pregnancy was the result of rape or incest.”
Her speech comes as Texas governor Greg Abbott signed off the so-called ‘heartbeat bill’ which bans the procedure after six weeks
At six weeks, many women do not yet know they are pregnant, effectively making an abortion impossible to access in the state.
There is no allowance made for those who become pregnant through rape or incest.
It also allows private citizens to sue abortion providers or anyone that “aids and abets” in abortions past that time frame.
Smith continued: “I have dreams and hopes and ambitions. Every girl graduating today does. We have spent our entire lives working towards our futures, and without our input and without our consent, our control over that future has been stripped away from us.
“I am terrified that if my contraceptives fail, that if I am raped, then my hopes and aspirations and dreams and efforts for my future will no longer matter.
“I hope that you can feel how gut-wrenching that is, how dehumanising it is, to have the autonomy over your own body taken away from you.”
The speech has been praised by political figures Hilary Clinton and former Texas congressman Beto O’Rourke.
Clinton wrote: “This took guts. Thank you for not staying silent, Paxton.”
O’Rourke said: “Paxton, thank you for having the courage of your convictions and inspiring Texas with your refusal to accept injustice as the price of participation in civic life.
“May we all use our place in this democracy to fight for what we believe to be right and follow your example!”