Supreme Court Justice Sonia Sotomayor chided her colleagues on the nation’s highest court for what she viewed as a double standard in their decisions on the travel ban and a baker who refused to serve gay couples.

In a dissent joined by Justice Ruth Bader Ginsburg, Sotomayor noted that the court decided in Masterpiece Cakeshop v. Colorado Civil Rights Commission on June 4 that a Colorado bakery owner was improperly treated by a state commission after a member said the baker had used “despicable” rhetoric about gays and lesbians.

But she noted that the court’s conservatives did not find a similar problem with Trump’s own words about Muslims and the travel ban his Administration put in place.

“Unlike in Masterpiece, where the majority considered the state commissioners’ statements about religion to be persuasive evidence of unconstitutional government action, the majority here completely sets aside the President’s charged statements about Muslims as irrelevant,” she wrote.

The Masterpiece case involved a same-sex couple that requested Masterpiece Cakeshop bake a cake for the couple’s upcoming wedding. The owner of the shop, Jack C. Phillips, declined to do so on the grounds that baking a wedding cake for a same-sex marriage would violate his religious beliefs.

The court decided, in a 7-2 vote, that Colorado Civil Rights Commission’s conduct in evaluating Phillips’ reasoning for not making the wedding cake violated the First Amendment’s guarantee of freedom of religion.

Justices Ginsburg and Sotomayor also dissented in that case.

In January of 2017, President Trump issued an executive order banning citizens from seven predominantly Muslim countries into the United States for 90 days. It also served as an indefinite pause on entry into the country by Syrian refugees.

The state of Hawaii, three of its residents, and a Muslim-American group challenged this iteration of the executive order, claiming that it was implicitly based on religious prejudice. They argued that the proclamation improperly singled out Muslims, violating constitutional protections against discrimination.

While campaigning for president, Trump called for a “total and complete shutdown” of Muslims coming into the United States, argued that “Islam hates us” and regularly cited a fake and discredited story about a U.S. general shooting Muslims with bullets dipped in pig’s blood.

The Supreme Court’s 5-4 majority opinion found that the president has broad powers to make decisions on national security grounds and that the travel ban was narrowly written enough that it did not run afoul of the First Amendment guarantees of freedom of religion.

“The Court must consider not only the statements of a particular President, but also the authority of the Presidency itself,” wrote Chief Justice John Roberts.

Correction: June 26

The original version of this story misstated the name of the Supreme Court case. It is Masterpiece Cakeshop v. Colorado Civil Rights Commission, not Masterpiece Bakeshop v. Colorado Civil Rights Commission.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Abby Vesoulis at abby.vesoulis@time.com.