New Jersey Senator Cory Booker, who is vying for the Democratic presidential nomination, said Sunday that he'd reverse President Donald Trump's ban on transgender troops “right away,” if elected president.

Booker made the pledge while speaking to more than 300 voters, the AP reported.

When a woman asked the candidate how he would protect LGBT rights as president, Booker answered: “When I am president of the United States, right away I will end this ridiculous, insulting, un-American ban on transgender Americans serving in the military.”

Trump first tweeted his decision to ban transgender troops from serving in 2017. Four lawsuits followed challenging implementation of the ban. Last week, the administration said its ban would take effect on April 12, the result of a Supreme Court decision allowing implementation while the policy is being challenged in the courts.

(Related: Defense Department says it will implement transgender military ban on April 12.)

The Palm Center, a think tank at the University of California, Santa Barbara that promotes the study of LGBT people serving in the armed forces, called on other presidential candidates to commit to ending the ban.

“Sen. Cory Booker has listened to the considered judgment of all five military service chiefs and has taken a strong stand on the need to rid our military of discrimination on day one of his tenure if elected,” said Aaron Belkin, director of the Palm Center. “This is the kind of leadership needed to ensure that politics doesn’t stand in the way of military readiness. We look forward to hearing where other candidates stand on this key issue of immediate reversal.”