Funeral of Rev. Clementa Pinckney in Charleston, South Carolina, United States - 26 Jun 2015.Photo: Tami Chappell/UPI/Shutterstock

WhileBarack Obamahad a seasoned group of speechwriters helping him come up with the words to mark both celebratory and solemn occasions, the former president has well-known oratorial skills of his own. One of his most iconic speeches as president, in fact, was apparently all him.
That’s according to Obama speechwriter Cody Keenan, who writes in his new book,Grace, that the now-iconic eulogy forRev. Clementa Pinckney— delivered in the wake of the 2015 massacre that killed nine at the Emanuel AME Church — was straight from the president’s heart.
As Keenan writes in his book, which was excerpted inVanity Fair, the eulogy marked the 14th time President Obama would address the nation following a mass shooting. As such, the president and his staff weren’t sure how much they could offer a grieving community.
“The next time this happens, I don’t want to speak,” Keenan recalls Obama telling him after Senate Republicans blocked a vote on universal background checks following theschool shooting in Newtown, Conn.
So Keenan had his work cut out for him when it came to delivering a eulogy for a beloved South Carolina reverend — also a state senator — who was gunned down in an allegedly racially motivated spree.
In a meeting ahead of the speech, Keenan writes that Obama determined he wanted to focus on “the concept of grace.”
“But let’s use it as a challenge,” Obama continued, Keenan writes. “I don’t want to congratulate ourselves too much when we as Americans just allow this s— to keep happening. Talk about guns. Talk about the flag. Talk about the way hundreds of years of racial subjugation and segregation still shape the present. But leave room for the possibility of progress. Leave room for grace.”
Keenan got to work, writing a roughly 2,000-word, four-page speech overnight. The next day, he heard from the president.
Obama, Keenan writes, had heavier edits than usual. Two of the four pages had been entirely stricken, with the other two full of handwritten notes.
“You gave me the scaffolding I needed to build something here,” Obama told him. “You’ll recognize your work in what I wrote.”
Never miss a story — sign up forPEOPLE’s free daily newsletterto stay up-to-date on the best of what PEOPLE has to offer.
The next day, the team was en route to Charleston for Obama to deliver the eulogy. After one more round of edits aboard Air Force One, the final version of speech was emailed to staff onsite, loaded onto a teleprompter and printed for the podium.
But there would be more revisions — these, however, would come from the president himself, while speaking onstage.
“You know, if it feels right, I might sing it,” Keenan recounts Obama saying as he made his way off the plane that day.
What happened next was moving and historic.
Onstage at Charleston’s TD Arena, Obama simultaneously memorialized the fallen pastor and called for Americans to examine race relations and gun control laws, using the concept of grace as a thread throughout the lengthy speech.
Near the end of the 39-minute speech, he got to the heart of the text.
“If we can tapthatgrace, everything can change,” Obama said.
“Amazing grace,” he continued, repeating the words once more for emphasis: “Amazing grace.”
And then, he launched into the hymn, singing the opening lines of “Amazing Grace” before the entire congregation joined in.
“By the time Obama hit ‘how sweet the sound,’ the whole arena was singing with him,” Keenan writes. “The organist jumped in at ‘a wretch like me.’ The drummer tapped his cymbals with a light touch, but so fast his sticks became a blur, creating a sustained swell of ‘tsssssssssss.’ The horn section began to blow. The guitarist uncorked a blues riff. Obama’s bet, that he wouldn’t be left alone, had paid off.”
It wasn’t Obama’s first time singing onstage, as the former presidentmade headlineswhen singing the opening bars of Al Green’s “Let’s Stay Together” at a fundraiser.
“But to sing this song, on this occasion, was something different altogether … this was a much bigger stage,” Keenan writes.
source: people.com