WASHINGTON — Describing President Trump’s revised travel ban as intolerant and discriminatory, a federal appeals court on Thursday rejected government efforts to limit travel to the United States from six predominantly Muslim nations. Attorney General Jeff Sessions quickly vowed to appeal to the Supreme Court.

The decision was the first from a federal appeals court on the revised travel ban, which was an effort to make good on a campaign centerpiece of the president’s national security agenda. It echoed earlier skepticism by lower federal courts about the legal underpinnings for Mr. Trump’s executive order, which sought to halt travelers for up to 90 days while the government imposed stricter vetting processes.

The revised order, issued on March 6, “speaks with vague words of national security, but in context drips with religious intolerance, animus and discrimination,” the United States Court of Appeals for the Fourth Circuit, in Richmond, Va., concluded in its 205-page ruling.

The White House derided the court decision as a danger to the nation’s security. And Mr. Sessions, in pledging to appeal to the nation’s highest court, said the government “will continue to vigorously defend the power and duty of the executive branch to protect the people of this country from danger.”