Three appeals court picks—David Porter, Ryan Nelson and Richard Sullivan—were among the 15 names the U.S. Senate confirmed to federal judgeships Thursday, after Senate Republicans and Democrats agreed to vote on a batch of judicial nominees as part of a compromise.

Senators, who agreed to vote on the group of nominations Thursday before returning to campaigning in their home states ahead of the 2018 midterms, also approved a dozen picks to federal trial courts.

Nelson was approved for a Ninth Circuit seat, 51-44, after he was nominated in May. He's served as general counsel of Melaleuca Inc., an Idaho-based nutritional supplement and wellness company, since 2009. Before that, he was deputy general counsel at the Office of Management and Budget, and served as a deputy assistant attorney general of the U.S. Department of Justice's Environment and Natural Resources Division.

Trump nominated Nelson to be solicitor for the Interior Department, but he was never confirmed to the post.

Porter, a Pittsburgh-based shareholder at the firm Buchanan Ingersoll & Rooney, was confirmed to the Third Circuit, 50-45. President Donald Trump nominated Porter to the appeals court in April over the strong objections of his home state Sen. Bob Casey, a Democrat. Casey did not return a blue slip for Porter, while the Republican senator from Pennsylvania, Pat Toomey, did.

Porter also faced resistance from judicial advocacy groups, in part because of his ties to conservative organizations like The Federalist Society.

Sullivan, nominated in April, was confirmed to the Second Circuit by a 79-16 vote. Sullivan moves up to the circuit court from his seat on the U.S. District Court for the Southern District of New York, where he has served since 2007. Before he joined the federal bench, he was general counsel and managing director of insurance broking company Marsh Inc., and was a federal prosecutor for over a decade in the Southern District.