While the Yankees try to improve their 2017 playoff chances...

Hundreds of demonstrators swarmed into Times Square Wednesday to protest President Trump’s statement that transgender people are no longer allowed to serve in the military.

Council Speaker Melissa Mark-Viverito and Public Advocate Leticia James joined the crowd as it chanted demands for “equality” and “human rights.”

“I served my country. I fought for the rich and the poor. And I cannot believe what our president has just said. I am appalled.” Army veteran and transgender woman Tanya Walker told The Post.

“I did not obstruct the government my serving in the military. I didn’t disrupt the military — don’t believe the hype.”

James had a scathing message for the president, whose sudden decision to ban trans people from the military took the LGBT community by surprise.

“We need to applaud all of those transgendered and members of the LGBT community who have served both me and you and all of us,” James told the crowd.

“Democracy demands that all of us raise our voices to this man, who not once but five times was a draft dodger.”

Mark-Viverito said she was “appalled and angry” at the president’s decision.

“Banning transgender Americans from military service is despicable, discriminatory and downright anti-American,” she said.

“This City Council will continue to fight to defend the rights of all New Yorkers.”

Renee Shalhoub, a special education teacher from New Jersey, attended the protest to support the LGBT community.

“If we don’t stand up for these people, who will?” she told The Post. “They’re targeting the people that are most vulnerable.”

Police sources said that there were more than 500 people at the spontaneous gathering.