Elon Musk took a subtle swipe at Donald Trump on Twitter after the president criticized the U.S. justice system.

On Sunday, the CEO of Tesla Motors and SpaceX praised America's judicial arm — a day after Trump tweeted angrily about a federal judge's decision to block a travel ban on citizens of seven mainly Muslim countries.

Musk, who sits on Trump's economic advisory council, has attempted to position himself as a moderate voice in the president's ear — someone who can help influence the White House without condoning its most controversial actions.

"Many in America don't realize how proud they should be of the legal system," Musk tweeted on Sunday.

Many in America don't realize how proud they should be of the legal system. Not perfect, but nowhere is the cause of justice better served. — Elon Musk (@elonmusk) February 5, 2017

Musk's message followed Trump's sharp criticism of U.S. District Judge James Robart in Seattle, who on Friday temporarily reversed the president's executive order that restricted immigration from Iraq, Syria, Iran, Libya, Somalia, Sudan and Yemen.

The president expressed his outrage on Twitter toward a federal institution that, by design, is supposed to check the powers of the White House and Congress.

What is our country coming to when a judge can halt a Homeland Security travel ban and anyone, even with bad intentions, can come into U.S.? — Donald J. Trump (@realDonaldTrump) February 4, 2017

Because the ban was lifted by a judge, many very bad and dangerous people may be pouring into our country. A terrible decision — Donald J. Trump (@realDonaldTrump) February 4, 2017

Just cannot believe a judge would put our country in such peril. If something happens blame him and court system. People pouring in. Bad! — Donald J. Trump (@realDonaldTrump) February 5, 2017

Musk is facing growing criticism for his participation in Trump's advisory council.

The tech executive last week defended his decision to remain on the economic council, explaining in a public note that he believes "engaging on critical issues will on balance serve the greater good."

He took another subtle jab at his critics on Sunday, arguing that activists should be pushing for more moderate leaders — not fewer — to advise Trump.

Activists should be pushing for more moderates to advise President, not fewer. How could having only extremists advise him possibly be good? — Elon Musk (@elonmusk) February 5, 2017

At least one tech executive, however, responded to public pressure and dropped out of the presidential forum.

Uber CEO Travis Kalanick last week stepped down from the council after thousands of users deleted their Uber accounts in response to the company's actions during a strike by New York City taxi drivers to protest Trump's so-called Muslim ban.