Congress’s top Democrats, including Speaker Nancy Pelosi and Senator Chuck Schumer of New York, called for his resignation, as did The Miami Herald, which uncovered the details of the plea deal.

“If Acosta, when he was U.S. attorney in Miami, had shown an ounce of sympathy for the vulnerable girls Epstein sexually exploited, they would have had a powerful voice on their side,” the paper wrote in an editorial.

Mr. Trump, in remarks while he met with the emir of Qatar, said on Tuesday that he felt “badly” for Mr. Acosta and praised him as “an excellent secretary of labor.” He added, “I do hear that there were a lot of people involved in that decision, not just him,” a reference to the Epstein deal. But he said the White House would look into the matter “very carefully.”

Two senior administration officials said Mr. Trump’s support for Mr. Acosta could quickly evaporate if more damaging details emerged about the plea agreement.

Republican senators, who all voted to confirm Mr. Acosta, were cagey in their defense. “To the degree there’s new information, I think people are willing to take a look at that,” said Senator John Thune of South Dakota, the No. 2 Republican in the Senate. “But I think most people believe that he went through a very thorough vetting process when he got his current job.”

Mr. Acosta ran the Civil Rights Division of the Justice Department during George W. Bush’s administration before landing the top spot at the United States attorney’s office in Miami. He left after the end of the Bush administration to become dean of the law school at Florida International University.

Mr. Acosta, who graduated from Harvard College and Harvard Law School, was tapped to be labor secretary after the president’s first choice, Andrew F. Puzder, withdrew his nomination once his business record came under attack. Championed by Senators Marco Rubio of Florida and Ted Cruz of Texas, both Cuban-Americans like Mr. Acosta, he sailed through the confirmation process in April 2017 with the Epstein incident barely mentioned.