The Senate voted Thursday to confirm President Trump’s first appellate court nominee, Judge Amul Thapar, overcoming opposition from Democrats and signaling the troubled road ahead as the White House tries to stock the bench with conservative judges.

Judge Thapar will fill a seat on the 6th U.S. Circuit Court of Appeals that’s been vacant since 2013.

Republicans said the judge is a good example of the kind of picks Mr. Trump should make.

“He will fairly apply the law to all who enter his courtroom because, in Judge Thapar’s own words, ‘the most important attribute of a judge is to be open-minded and not to prejudge a case without reading the briefs, researching the law and hearing from the parties,’” said Senate Majority Leader Mitch McConnell, Kentucky Republican.

Thursday’s 52-44 party-line vote is part of a near-universal resistance Democrats have mounted to Mr. Trump’s major nominees, both for his administration and now for the federal courts. Four Democrats didn’t cast a vote.

During the judge’s confirmation hearing, Democrats complained about his record, saying he equates campaign donations with speech and is tied to The Federalist Society, an association of conservative and libertarian legal minds.

Sen. Richard Blumenthal, Connecticut Democrat, told The Washington Times that any of Mr. Trump’s picks that can be tied to The Federalist Society could face resistance.

He said The Federalist Society is attempting “unprecedented influence” in the judicial selection process.

Sen. Angus S. King Jr., a Maine independent who caucuses with Democrats, questioned Judge Thapar’s campaign finance jurisprudence, which followed Supreme Court precedent finding that political campaign donations are protected speech under the First Amendment.

“I don’t think money is speech,” Mr. King said.

Sen. Patty Murray, Washington Democrat, was more broad in her criticism: “I don’t feel he would represent the people well on that court.”

Judge Thapar received the highest rating possible from the American Bar Association.

The 6th Circuit Court sits in Cincinnati and covers Ohio, Michigan, Kentucky and Tennessee.

Curt Levey, executive director for the Committee for Justice, said he doesn’t expect a major impact on the court’s rulings because a majority of the judges are already GOP appointees.

“Perhaps the most important thing about Thapar’s quick confirmation is that it puts him in a perfect position to fill any Supreme Court vacancies that occur in 2018 or thereafter,” said Mr. Levey.

Judge Thapar is Mr. Trump’s first circuit court nominee to clear the Senate. He’s made five other picks, with more than a dozen other vacancies still awaiting nominations.

Judge Thapar will be just the second appeals court judge who claims South Asian ancestry.

Carl Tobias, a law professor at the University of Richmond, said Judge Thapar will bring ethnic diversity to the 6th Circuit Court, and help with the caseload since the seat had been vacant for more than three years.

Mr. Tobias said the seat sat vacant because Republicans used tactics based on home-state senatorial courtesy to block President Obama’s nominee for the seat.

Now, with the GOP in the majority and Mr. Trump in the White House, Democrats are eyeing the same home-state courtesy as a way to block at least some of the president’s picks.

At least two of Mr. Trump’s other appellate nominees who haven’t yet been scheduled for a hearing — one each in the 6th and 8th Circuits — come from home states with two Democratic senators.