The idea had been running through Race Imboden’s mind for a while. Finally, pushed by news of two mass shootings in the United States over the first weekend of August and the availability of a public platform after a victory at the Pan American Games, the American fencer could keep silent no longer.

In a protest heard across the country, he took a knee during “The Star-Spangled Banner” after he was part of the gold medal-winning foil team Friday and then explained his decision on social media.

“I opened my phone to text my parents that we’d won. I opened Instagram and my mother had posted that it’s not a time to stay silent and, you know, I see stuff like that all the time,” he said in a telephone interview. “A lot of my friends are posting things of that nature, and I just thought it was — again, there was a shooting so recently and my feed was filled with people being upset and hurt by the tragedies that happened over the week and I felt it was necessary to do my part.”

In a series of tweets that included the image of him kneeling, Imboden called for change and criticized President Trump as “a president who spreads hate.”

“We must call for change. This week I am honored to represent Team USA at the Pan Am Games, taking home Gold and Bronze. My pride however has been cut short by the multiple shortcomings of the country I hold so dear to my heart,” he tweeted. “Racism, Gun Control, mistreatment of immigrants, and a president who spreads hate are at the top of a long list. I chose to [sacrifice] my moment today at the top of the podium to call attention to issues that I believe need to be addressed. I encourage others to please use your platforms for empowerment and change.”

Imboden, 26, was influenced by Colin Kaepernick, the free agent quarterback who began his protests in the summer of 2016. From there, the protest movement spread across the NFL and to athletes of all ages, both amateur and pro, male and female. Kaepernick, like others, has made it clear he demonstrated during the national anthem to raise awareness of social injustice and police brutality. Heavily criticized by Trump, he and others have repeatedly said the protest is not directed at members of the military.

For Kaepernick, the cost has been significant. He has been unable to land with an NFL team since he opted out of his contract with the San Francisco 49ers in the spring of 2017. Imboden competes in a sport with a far smaller footprint in America, and a podium protest called for him to weigh his big moment against “a bigger cause.” A 2016 Olympic team event bronze medalist, he and teammate Miles Chamley-Watson took a knee during the anthem at a World Cup event in Egypt in 2017. Last month, he won a team world championship gold medal, his first, but stood for the anthem.

“I had knelt before, and I think it’s an appropriate response to that situation. Kaepernick had spoken to veterans about what act was an appropriate protest, and he talked about kneeling,” Imboden said. “I liked that, and I liked that it was come up with for a reason. For me to kneel during the anthem, it’s the hardest place for me to get to in my sport — the top of the podium. So to sacrifice that moment for a bigger cause was why I chose to do that.”

It’s a protest that may well have a cost for Imboden, with the U.S. Olympic and Paralympic Committee looking into possible discipline. Athletes must sign an agreement saying they will comply with Rule 50 of the Olympic Charter, which states, “No kind of demonstration or political, religious or racial propaganda is permitted in any Olympic sites, venues or other areas.” The committee has said there could be consequences for him and Gwen Berry, the hammer throw champion who raised a fist during the anthem at the Pan American Games.

“I met with the organizers. I met with the USOC right after I did the protest,” Imboden said. “They told me that this was something they had to consider. They were very cordial. They were not harsh. There were no bad terms from either USA Fencing or the USOC.”

Imboden informed teammates Gerek Meinhardt and Nick Itkin of his decision to kneel after they won gold in team foil. Both of them remained standing.

“I asked them if it was something they felt uncomfortable with or wouldn’t like me to do, and they were fine,” Imboden said. “They were supportive. If they had said they didn’t want me to do that, then I would not have done it.”

Since that moment, his accomplishment has been overtaken by headlines and images, and Imboden is “totally fine with that."

“I love to fence and I compete because I want to win and it’s important to me, but I would much rather that people know [about] these [societal] problems than know me as champion in fencing,” he said.

The Tokyo Olympics are less than a year away and Imboden can’t rule out a protest there, a sobering prospect for the Games’ organizers with a demonstration sure to draw Trump’s attention. The decision would be a daunting one for Imboden.

“Obviously, I chose to break that rule at the Pan Am Games and it’s something that caused a huge amount of attention and I would never take that lightly,” Imboden said. “I would never say right now I’m prepared to do that again. But it is something that I think is going to be a question on everyone’s minds.

“I think that athletes have that power, and that power should never be taken away from them because it’s their right. I’m not going to say that it’s something I’m planning now. Right now, I’m just focused on trying to spread my message in an appropriate manner.”

The blowback from his demonstration has gone far beyond his 21,000 Twitter and 57,000 Instagram followers. “I’m very pleased that I spoke about something important and that’s why I use social media the way I use it, to speak about things that are important and mean something to me,” he said. “So I’m happy that message got out and I expected some backlash. When I saw how many people it had reached, I expected there would be negative reactions, but there were lots [of them].”

In other posts, Imboden has quoted Arthur Ashe and used the platform to help bring fencing to those who might not have access or funds for the equipment. On one post, he wrote: “This quote has been in my life for 10 years now. As an athlete we play these games as a way to test our own abilities. We are never proud of defeating our opponent. We are proud of the skills we performed to defeat them. In many ways our opponent is our best friend. The stronger they are the greater our skills must be to defeat them. Without a strong opponent we will never find our ultimate level. ‘You are never really playing an opponent. You are playing yourself, your own highest standards, and when you reach your limits, that is real joy.’- Arthur Ashe”

And he has sought to remove some of fencing’s reputation as an elite sport. Another Instagram post tells his own fencing story. Born in Tampa, the redhead who has spoken of wanting to take fencing “to the next level,” grew up in Brooklyn, developing a keen interest in hip-hop, being a DJ and doing fashion modeling.

“I remember as a kid I wanted all the best equipment and unfortunately my parents couldn’t afford it. I used to go through the blades people tossed out and rewire them for my competitions,” he wrote. “My first @allstar.fencing mask was a hammy down [sic], and I’m pretty sure my first set of matching fencing equipment was when I made my first senior team. Damn, I’ll even admit I would stop by the lost and found at the end of NACS [North America Cups] and pick up a few things I needed 😅. When I started to get fencing equipment for free it meant a lot to me. Being able to give that happiness to someone else now brings me a very special type of joy.”

What’s next now for Imboden is “a few months off” on the fencing schedule, a friend’s wedding and fallout from his demonstration.

“I’m going to be just dealing with this,” he said, “seeing where it takes me and taking it one step at a time.”

Read more from The Post:

Protests present a difficult issue as Tokyo Olympics, presidential election loom

Simone Biles completes historic triple-double en route to sixth U.S. gymnastics championship

In equal pay fight, U.S. Soccer lobbyist contacted Democratic presidential candidates

Olympic gymnastics squads are shrinking for 2020. That’s good and bad for Team USA.