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

Soon after, Senate Republicans voted to end debate on two of the president’s picks for federal appeals courts. The Senate voted 51-27 to move ahead on Daniel Domenico for the U.S. Court of Appeals for the Tenth Circuit. It voted 49-26 to move ahead on Anna St. John for the Fifth Circuit. The press gallery said final votes on both will be held at a time still to be set.

“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 about the nomination before the vote. When she introduced Mr. Cook at his hearing in August, she called him “one of Alabama’s finest.” Sen. Tommy Tuberville, also an Alabama Republican, joined her in voting to move the nomination forward.

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

Mr. Cook grew up in Florence, Alabama. He 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 someone to take Mr. Cook’s place 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 as a federal district judge in President Trump’s second term, according to Yellowhammer News.