U.S. Rep. Joe Kennedy III condemned President Donald Trump's Wednesday decision to bar transgender individuals from U.S. military service, arguing that those who are already serving in the armed forces "deserve better" from their commander in chief.

The Brookline Democrat, who serves as chairman of the Congressional Transgender Equality Task Force, was among several Massachusetts Democrats who took issue with the president's announcement.

Contending that men and women who enter the military defend all Americans regardless of their age, race, religion or gender identity, Kennedy argued that the U.S. government owes soldiers "that same decency in return."

"Instead, this morning, our president has told thousands of American soldiers that they will fight for us, but we will not fight for them. That their deeply personal medical decisions are somehow the public's business. That although they are willing to sacrifice their lives to protect our freedom, we will not offer them the most basic freedom in return," he said in a speech from the U.S. House floor.

"The president of the United States looked American soldiers in the eye and dared to question their patriotism, their courage. He doubted their commitment to their brothers and sisters in uniform, he said that our military couldn't or wouldn't stand for all of us," the congressman continued.

Addressing transgender service members directly, Kennedy urged them to know that "a grateful nation does not take your service, your patriotism for granted."

"You deserve better from your president. You deserve better from your government. You deserve better from your country," he said.

U.S. Sen. Elizabeth Warren, D-Massachusetts, also slammed the president's decision regarding transgender individuals serving in the military, contending that it "makes clear that he cares more about extreme ideology than military readiness."

"The only thing -- only thing -- that matters when it comes to allowing military personnel to serve is whether or not they can handle the job," she tweeted.

Warren added that while Trump can "pretend this is a military decision," it's not.

"Banning troops on gender identity is shameful and makes us less safe," she argued.

The only thing – only thing – that matters when it comes to allowing military personnel to serve is whether or not they can handle the job. — Elizabeth Warren (@SenWarren) July 26, 2017

By attacking thousands of troops, @realDonaldTrump makes clear that he cares more about extreme ideology than military readiness. — Elizabeth Warren (@SenWarren) July 26, 2017

.@realDonaldTrump can pretend this is a military decision, but it isn't. Banning troops on gender identity is shameful & makes us less safe. — Elizabeth Warren (@SenWarren) July 26, 2017

U.S. Sen. Ed Markey, D-Massachusetts, called the president's transgender military ban "un-American and unconstitutional," contending that "every American, no matter their race, faith, sexual orientation or gender identity, should be allowed to express their commitment to the United States through military service."

Transgender service members, the senator added, are not a distraction, but "dedicated patriots" who deserve respect and support.

"President Trump is undermining our military readiness and the Defense Department's success in building a diverse, cohesive military that respects the human dignity of all of its members," he said in a statement. "President Trump is playing to the worst instincts of prejudice, bigotry and ignorance with this ban. Division and exclusion only makes our military weaker, not stronger."

Congressman Richard Neal, D-Springfield, meanwhile, said "Trump's decision to ban transgender Americans from serving in the military is wrong and contrary to our core values."

U.S. Rep. Jim McGovern, D-Worcester, agreed, arguing that "America is strongest when all who love our country can serve."

The Worcester Democrat called the president's decision "shameful" and stressed that he "stands with" transgender service members.

"America is strongest when all who love our country can serve. @POTUS attack on #transgender service members is shameful. I stand with them," he tweeted.

America is strongest when all who love our country can serve. @POTUS attack on #transgender servicemembers is shameful. I stand with them. pic.twitter.com/no1jEg9kYF — Rep. Jim McGovern (@RepMcGovern) July 26, 2017

Congresswoman Niki Tsongas, D-Lowell, also took issue with the president's announcement, contending that "gender identity should not be (an) artificial hurdle to service."

Pointing to former Chairman of the Joint Chiefs of Staff Adm. Mike Mullen's recent call to limit congress's role in shaping policy regarding transgender troops, she added that there is "no reason to single out transgender service members."

Our military needs all who are qualified and willing to serve. Gender identity should not be artificial hurdle to service. — Niki Tsongas (@nikiinthehouse) July 26, 2017

Fmr Chmn of Joint Chiefs says it best: no reason to single out trans servicemembers and deny med care. https://t.co/jAiT6DQyDl — Niki Tsongas (@nikiinthehouse) July 26, 2017

U.S. Rep. Katherine Clark, D-Melrose, called the president's decision "a despicable display of bigotry and disrespect for the tens of thousands of transgender service members and veterans who have served their country honorably."

She pledged to do everything possible to "fight this dangerous and discriminatory ban."

Congressman Seth Moulton, D-Salem, said the policy "is wrong, morally and militarily."

"President Trump is making the same argument used against keeping gays and lesbians and African Americans from serving," he said in a statement. "These are Americans who are willing to put their lives on the line for our country, which is far, far more than President Trump has ever been willing to do."

Trump tweeted Wednesday that the government will not accept or allow transgender Americans to be service members -- a conclusion he said he made after speaking with generals and military experts.

"After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow transgender individuals to serve in any capacity in the U.S. Military," he tweeted. "Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail. Thank you."

In June, U.S. Secretary of Defense Jim Mattis gave military chiefs another six months to review whether allowing transgender individuals to enlist in the military would affect the force's "readiness or lethality."

The delay did not not affect transgender individuals who were already serving in the military openly, according to the Associated Press.