A candidate for a top position at the Department of Homeland Security (DHS) pulled his name from consideration for the job on Thursday after President Trump's announcement that transgender Americans would be banned from serving in the armed forces "in any capacity."

John Fluharty, a former executive director of the Delaware Republican party, told the agency in an email that he was no longer seeking the position of assistant secretary of partnership and engagement after Trump's announcement on Twitter Wednesday morning.

Fluharty wrote in the email, first obtained by Politico, that Trump's surprise decision to ban all transgender troops from serving in the armed forces "runs counter to my deeply held beliefs."

"As I mentioned in our conversation, I am a strong advocate for diversity, both in the Republican Party and in government," Fluharty wrote. "The President's announcement this morning - that he will ban all of those who identify as transgender from military service - runs counter to my deeply held beliefs, and it would be impossible for me to commit to serving the Administration knowing that I would be working against those values."

Fluharty confirmed the email in a message to The Hill, and added that the agency handled his withdrawal in a "respectful and professional" manner.

"I am grateful for having been asked to interview," Fluharty told The Hill, "and DHS handled my

response in a respectful and professional manner."

In an email to Politico, the Department of Homeland Security confirmed Fluharty's decision and stated that none of the other candidates being considered had notified the agency that they were dropping out of consideration.

"He was one of many candidates being considered and he withdrew from consideration," DHS spokesman David Lapan said in an email.

"We're not aware of anyone else who withdrew for that reason."