Phoenix, Arizona (CNN) The Southern Baptist Convention moved to denounce the "alt-right" white nationalist movement Wednesday, a collective decision that occurred only after pastors pushed back against denominational leaders who initially chose not to address the issue.

At their annual meeting, Southern Baptists agreed to a statement decrying "every form of racism, including alt-right white supremacy, as antithetical to the Gospel of Jesus Christ."

Denominational leaders had planned not to vote on a resolution about race relations, but reversed course following an outcry on the floor of the convention the day before. Leaders worked through the night to craft an updated resolution after the original text failed to gain traction on the first day of the convention.

The debate began when Rev. Dwight McKissic, a black pastor from Arlington, Texas, called on Southern Baptists to formally condemn the movement's "retrograde ideologies, xenophobic biases, and racial bigotries" and re-affirm its opposition to racism in the aftermath of a presidential election that saw the rise of a small movement of nationalist and white supremacists that coalesced in support of President Donald Trump.

Dr. Steve Gaines gives the president's address during the Southern Baptist Convention annual meeting, Tuesday, June 13, 2017, in Phoenix.

Members of the Southern Baptist Convention, a coalition of churches that comprise the nation's largest Protestant denomination, convene just once a year to discuss church business, make budget decisions, commission new missionaries and vote on "resolutions" that affirm their theological, social or political priorities. A Resolutions Committee chooses what topics will be formally voted upon before the meeting. This year's list of approved resolutions, for example, included a call to defund Planned Parenthood, a rebuke of gambling and an affirmation that morality is important for political leaders.

Race relations are an extremely sensitive issue within the Southern Baptist Convention. The denomination was founded in 1845, when it split from other Baptists who opposed slavery. The denomination did not formally rebuke its past until 1995, when Southern Baptists voted to repent and apologize for their history of racism, support of slavery and failure to stand firmly in opposition to white supremacy. The body did not elect its first black president of the convention until 2012; the first black president of its annual pastor's conference began his term of service this year. Like the nation's population as a whole, the American Church is becoming less white, a demographic shift that has led many denominations to ensure they put more emphasis on diversity in leadership and make worshippers of color feel welcome in their sanctuaries.

McKissic's resolution, however, had been rejected by the convention's Resolutions Committee before the meeting. It would not receive a vote unless it was forced by the will of the convention attendees -- called "messengers" -- from the floor.

On Tuesday afternoon, McKissic stood to introduce his resolution and ask why it was rejected. Barrett Duke, chairman of the Committee on Resolutions, said that it had been rejected because it "was not well-written" and included "inappropriate" language.

McKissic called for the body to instruct the committee to reconsider, which would require a two-thirds majority. It failed.

Few messengers had seen the actual resolution and many expressed confusions about what, exactly "the alt-right" was. Still, the rejection set off alarm bells among many pastors at the convention who couldn't believe their denomination might fail to stand against new manifestations of racism and chose not to act.

After the vote on whether to consider McKissic's resolution failed, Rev. Garrett Kell, the lead pastor of Del Ray Baptist Church in Virginia, who is white, approached a microphone and addressed SBC president, Rev. Steve Gaines.

"This may show my ignorance, sir, because I don't know how this works," Kell said. "But I would hate for us to leave here today with confusion about where the Southern Baptist convention stands on the alt-right."

Kell was told that the messengers would need to agree to re-open the Resolutions Committee process, which seemed unlikely.

Meanwhile, McKissic was incensed. He walked through the crowded convention hall and demanded a meeting with the convention's Parliamentarian to find a way for the issue to be addressed.

McKissic was told that there was still a way: He could try to bring it up again at another session that night.

He did, but this time he didn't come alone. A group of mostly young, Gen-X and Millennial pastors had mobilized through social media, and vowed to help him navigate convention rules to force a vote.

JUST WATCHED What is the alt-right movement? Replay More Videos ... MUST WATCH What is the alt-right movement? 02:33

"I'm going to make sure that this Southern Baptist Convention is not going to complete with any illusion that this entity supports in any way a racist group, especially in light of the fact that this convention was founded on racist ideologically," Kell said. "Being unclear on the spirit of this is dumb, foolish and bad stewardship of time."

Charles Hedman, a pastoral assistant at Capitol Hill Baptist Church in Washington, DC, and an attorney versed in the arcane rules of parliamentary procedure, took the lead from the floor.

He called on the convention to reconsider McKissic's resolution and "condemn the alt-right from the stage as we speak right now so there is not misunderstanding from the press or this convention."

Standing at another microphone across the room, Kell pressed further.

"I just want clarity from the president of the Southern Baptist Convention about whether we condemn, as a convention, racism," he said.

People worship during the Southern Baptist Convention annual meeting.

Speaking from the stage, Gaines responded, "I'll speak for myself. I don't know that I can speak for everyone in this room, but I believe God loves everyone. I believe there is only one race and that is the human race."

Another vote was taken on whether to make more time to reconsider.

They wouldn't know the results for another three hours.

Danny Akin, a denomination leader and president of the Southeastern Baptist Theological Seminary, called Gaines on the phone.

"I think we're heading toward a trainwreck,"Akin warned him.

As a back-up plan, a group of pastors came together and vowed to work through the night to draft their own resolution condemning racism and release it on their own accord through social media.

But behind the scenes, Southern Baptist leaders were already working fast.

Russell Moore, the president of the Ethics and Religious Liberty Commission, and a leading Southern Baptist voice on the issue of racial reconciliation, took the lead to re-write the resolution. As an outspoken critic of Trump in 2016, Moore became a polarizing figure last year -- at least temporarily -- within the denomination. Trump went on to win a supermajority of support from evangelical voters, putting Moore largely out of step with his theological brethren.

But that was then. Now, the Southern Baptists needed his voice more than ever.

"It was critically important to get this right" Moore said. "The alt-right isn't just some sociological movement. The alt-right is contrary to the gospel of Jesus Christ and Satanic to the core. We need to be very clear on that."

Moore and members of leadership went into overdrive working backstage on a new, air-tight resolution.

Racial unity and justice is a hill on which to die.



If you're at #SBC17, get in the convention hall and stay till last gavel. — Russell Moore (@drmoore) June 14, 2017

After a worship service and a ceremony to commission new missionaries, Gaines and other leaders returned to the stage to announce the results of the vote three hours earlier.

This one, too, he announced, failed to reach the two-thirds needed. Messengers in the conventional hall gasped.

Gaines, however, was resolute about not leaving until the issue was addressed. Under a cloud of external pressure from media reports saying they had failed to condemn racism and a storm of criticism on social media, Gaines decided to push the boundaries of the rules.

The Resolutions Committee, he said, recognized that they had made a mistake and unanimously voted to request something of a parliamentary do-ver. Even though they had already formally closed their annual report, they requested permission from the convention to use open time the next day to hold a vote on a newly worded resolution that would condemn the of the philosophy alt-right.

Russell Moore, president of the Ethics and Religious Liberty Commission, speaks at a news conference on Tuesday.

The new resolution, which risked little confusion with the new title, " On the Anti-Gospel of Alt-Right White Supremacy ," could be voted on the following day if two-thirds agreed to an immediate vote. Gaines took time to explain what the alt-right was and why he and other leaders believed it should be condemned. He called the vote.

A sea of hands went up throughout the convention all. Organizers said they saw only one person vote in opposition.

After the dramatic vote, pastors gathered in a nearby room to debrief, where they acknowledged that they narrowly dodged a catastrophe.

"We ended up with a black eye here," said Al Mohler, president of the Southern Theological Seminary. "We should never apologize for doing the right thing even if we end up a little bruised in doing it, even if we stumble over each other on the way to doing it. ...Thanks be to God we got a chance to come back tomorrow and say what we want to say.

"That was so close to being a disaster."