Former White House press secretary Sean Spicer's new book provides a glimpse into how then-candidate Donald Trump came to include a statement of support for LGBT people in his acceptance speech before the 2016 Republican National Convention.

The party's platform was among the most hostile to LGBT people, but the nominee described LGBT people as "wonderful Americans" and promised to protect them from foreign hatred and oppression.

In his just-released memoir "The Briefing: Politics, the Press, and the President" (Regnery Publishing), Spicer says Trump's positive remarks about LGBT people were a trade-off. They were the price the Trump campaign agreed to pay one convention delegate from Washington, D.C., whose name was the last one on a petition that could have held up Trump's nomination.

In particular, they wanted to change a rule that required that each delegate vote for the candidate to whom the majority of his delegation supported. And they wanted to get rid of a rule that limited nominations at the convention to candidates who had a majority of supporters from at least five state delegations.

During the 2016 Republican convention, wrote Spicer, Paul Manafort - Trump's then-campaign manager who's now on trial for tax and fraud charges - had to do some "twisting arms" to get some delegates to take their names off a petition that sought to change those rules. He and his helpers persuaded every delegate who signed the petition to take his/her name off, until there was but one delegate's name left on the petition: Robert Sinners.

Sinners was a supporter of former Ohio Governor John Kasich and a member of the D.C. delegation.

"We were dangerously close to a convention floor fight over the rules," recalled Spicer in his book. "The Never Trumpers had circulated a petition to vote down the rules package. It would have taken the party away from its grassroots voters and volunteers and handed it over to a faction that thought it could manipulate the convention in its favor. ..."

"Manafort and his lieutenants went one by one down the list of people who had signed the petition and persuaded them to remove their signatures," wrote Spicer. He said they used "carrot and stick and sometimes bat" techniques and, at one point, they even made the convention's parliamentarian "unavailable to keep the opposition from formally submitting their petition."

"Finally," wrote Spicer, "it came down to Robert Sinners ...

"Sinners is a hard-charging, passionate Republican who had been told that the petition was in the best interest of the party and the candidate himself," Spicer wrote. "Sinners suddenly became the focus of the Manafort team, and he had an issue he wanted addressed.

"Jason assured Sinners that Trump would be the most 'inclusive' candidate the Republican Party ever had," wrote Spicer. He told Sinners: "This is your moment. ... You can deliver this." Somebody put a pen in Sinners hand as Miller told Sinners that Trump's acceptance speech would acknowledge the LGBT community.

And that was that.

On Thursday of convention week, nominee Trump recalled a gunman's attack on the Pulse gay nightclub in Orlando, Florida.

"Only weeks ago, 49 wonderful Americans were savagely murdered by an Islamic terrorist - this targeting the LGBTQ community," he said. "No good, and we're gonna stop it. As your president, I will do everything in my power to protect our LGBTQ citizens from the violence and oppression of a hateful, foreign ideology - believe me."

Gay Republicans were thrilled with Trump's remarks. No other Republican presidential nominee had ever spoken so supportively of the LGBT community or even made explicit mention of the LGBT community as being part of the Republican Party.

Sinners, who got a job in the Trump administration, did not respond to a reporter's email asking to discuss the convention deal.

Gregory T. Angelo, president of the national Log Cabin Republicans group, said he does not know Sinners and had been unaware of the "horse-trading" that took place during the convention. Angelo added that he doesn't read "Spicer's account with any amount of cynicism."

"Trump was asked to mention the LGBT community in his speech, and he agreed without hesitation! How awesome is that?" said Angelo.

Sinners is currently working as a special assistant to the regional administrator of the General Services Administration, a position he has held since May 2017. According to a financial statement he filed with that position, he previously worked in real estate. He is a member of the D.C. Young Republicans where his profile indicates he was born and raised in South Carolina, then moved to Washington, D.C. His profile says he has worked for more than 30 candidates in 14 states and was elected delegate to the 2016 Republican convention.