The Senate on Thursday confirmed Alabama Supreme Court Justice Greg Cook, President Donald J. Trump’s nominee, as a federal judge for the Northern District of Alabama. The vote was 49-27, along party lines, according to the Senate Press Gallery.

Shortly afterward, Senate Republicans voted to end debate on two of the president’s nominees to federal appeals courts. The Senate invoked cloture 51-27 on the nomination of Daniel Domenico to the U.S. Court of Appeals for the Tenth Circuit, and 49-26 on the nomination of Anna St. John to the Fifth Circuit. Final votes on both nominations will be held at a time to be determined, the press gallery said.

“The people of the Great State of Alabama are in good hands with Greg on the Federal Bench,” President Trump said when he announced Mr. Cook’s nomination, Yellowhammer News reported.

Sen. Katie Britt of Alabama, a Republican member of the Senate Judiciary Committee, spoke on the nomination before the vote. When she introduced Mr. Cook at his confirmation hearing in August, she called him “one of Alabama’s finest.” Sen. Tommy Tuberville, also an Alabama Republican, joined her in voting to advance the nomination.

Mr. Cook told the committee that he begins every case with the text of the law. “We don’t determine what it should be, we determine what it is,” he said.

Mr. Cook was raised in Florence, Alabama, and graduated from Duke University and Harvard Law School. He served as a captain in the U.S. Air Force and practiced law in Birmingham for more than three decades. Alabama voters elected him to the state Supreme Court in 2022 with 67.4 percent of the vote. He fills the seat of U.S. District Judge R. David Proctor, who took senior status on Jan. 1. Gov. Kay Ivey will appoint his successor on the state Supreme Court.

Senate Republicans are working to confirm as many of the president’s judicial nominees as they can before the new Congress begins in January. “We’re going to make every second count, and that means all these judicial appointments,” Sen. John Barrasso of Wyoming, the Republican whip, said on Tuesday, CNN reported. Sen. Chuck Grassley of Iowa, the Judiciary Committee chairman, said, “I’m going to work hard to get judges confirmed quickly during the lame duck session.”

Mr. Cook is the fourth Alabamian confirmed to a federal district judgeship in President Trump’s second term, according to Yellowhammer News.