President Obama has reshaped the federal courts for decades to come with a record number of women and minorities appointed to lifetime judgeships, despite losing his high-profile battle over the U.S. Supreme Court this year.

Of the more than 340 judges nominated by Mr. Obama and confirmed by the Senate, about 42 percent are women, 19 percent are black and 11 percent are Hispanic — more female and minority appointees than any other president. Mr. Obama also has appointed at least 11 federal judges who are openly gay, another record.

Along the way, the president has turned nine of the 13 key federal appeals courts into majority-Democrat courts. When he came into office in 2009, only one of the circuit courts was majority Democrat.

“That’s a huge impact,” said Carrie Severino, chief counsel and policy director at the Judicial Crisis Network, a conservative legal group. “Typically, we see over eight years that a president will have a chance to replace a third of federal judges, and that was just what Obama did. And he was very strategic in how he did that.”

Although Senate Republicans blocked Mr. Obama’s nomination of Judge Merrick Garland to replace the late Justice Antonin Scalia on the Supreme Court, the circuit courts handle much larger caseloads overall. Mr. Obama’s impact is already clear.

The 4th U.S. Circuit Court of Appeals, based in Richmond, Virginia, previously was known as one of the most conservative appeals courts in the nation. Democratic appointees now outnumber Republicans by a 2-1 margin.

That circuit court struck down North Carolina’s voter ID law in July in a unanimous ruling by a three-judge panel consisting of Judges Diana Gribbon Motz, who was nominated by President Clinton; Henry Floyd, nominated to the federal bench by President George W. Bush and elevated to the 4th Circuit by Mr. Obama; and James A. Wynn Jr., another Obama appointee.

The same court last spring also ruled in favor of a transgender student seeking to use high school bathroom facilities matching the student’s gender identity rather than biological gender. Two of the judges were appointed by Mr. Obama, and the third was appointed by President George H.W. Bush.

The U.S. Circuit Court of Appeals for the District of Columbia, where Mr. Obama has placed four nominees, is considered the most important of all the circuit courts, with a heavy dose of cases involving federal regulations and separation of powers.

“His picks were undeniably very liberal, very friendly to his approach toward the administrative state, particularly in an administration that was trying to find ways of doing business that didn’t involve having to get the approval of the elected branch,” Ms. Severino said. “He used the administrative state very aggressively, and I think that was why the D.C. Circuit was such a big priority for him.”

Mr. Obama’s judges on the 11-member appellate court are Sri Srinivasan, Patricia Ann Millett, Nina Pillard and Robert L. Wilkins. The latest three were confirmed in rapid succession by simple majority votes after Senate Democrats used the “nuclear option” in November 2013 to eliminate the rule requiring a supermajority of 60 votes for most judicial confirmations.

University of Richmond law school professor Carl Tobias said Mr. Obama’s influence on the D.C. Circuit Court will be “one of the most important legacies he has.” Judge Pillard, at age 55, is the oldest of the four Obama appointees on that court.

“That’s the second most important court in the country,” Mr. Tobias said. “The cases it gets are so critical, regulatory cases with huge stakes for industry and for people. Also, it’s a springboard for the Supreme Court.”

On the high court, the two justices appointed by Mr. Obama — Sonia Sotomayor and Elena Kagan — have been reliable votes for the liberal bloc.

Hans von Spakovsky, a former Bush administration official who is an analyst at the Heritage Foundation’s Edwin Meese III Center for Legal and Judicial Studies, said the president “has appointed some of the most liberal, ideological and radical judges to ever sit on the federal bench.”

“Obama has already left his mark on the federal judiciary. Indeed, in his eight years in office, he has changed its character — and not in a good way,” Mr. von Spakovsky said in a blog post.

‘All-time historic record’

The “historic” diversification of the federal bench also has forged a judiciary that will be more sensitive to issues of gender and racial bias, said Sheldon Goldman, a political science professor at the University of Massachusetts-Amherst who has tracked judicial nominations for nearly 40 years.

“Diversity matters,” Mr. Goldman said. “Judges reflect who they are. You can’t separate out the judge from his or her lifetime of experiences.”

Mr. Obama’s judicial nominees have been confirmed at a pace comparable to previous two-term presidents, although confirmations have slowed dramatically since Republicans regained control of the Senate in early 2015. The Senate confirmed 80.9 percent of Mr. Obama’s circuit court nominees, compared with 62.9 percent for George W. Bush’s appointees and 71.9 percent for the nominees of Bill Clinton.

On the lower district courts, the Senate confirmed 82.7 percent of Mr. Obama’s appointees, compared with 92.3 percent for Mr. Bush and 87.2 percent for Mr. Clinton.

But the Republican-led Senate in the 114th Congress has confirmed only two Obama nominees to circuit courts in two years — none this year — and only 18 district court judges.

Since the Carter administration in the late 1970s, Mr. Goldman has rated the judicial confirmation process with his Index of Obstruction and Delay, which takes into account the number of nominees confirmed and the length of time they waited for a vote.

The 114th Congress has rated a 1.00, or total obstruction and delay, for Mr. Obama’s circuit court nominees. None was confirmed within a 180-day waiting period, and only two were confirmed overall.

“That’s an all-time historic record,” Mr. Goldman said. “This is a perpetuation for over 20 years of a really vicious cycle, where Republicans, then Democrats, then Republicans up the ante for obstruction and delay. That’s just not healthy for the judiciary.”

In the 111th Congress, when Democrats held the majority in the Senate, the index for Mr. Obama’s nominees was 0.50.

Republicans often point out that Mr. Obama, as a senator, tried to filibuster Samuel Anthony Alito for the Supreme Court in 2005. Analysts say Mr. Obama’s rate of getting judges confirmed would have been lower if Senate Democratic leader Harry Reid of Nevada hadn’t used the “nuclear option.” Eleven judges have been confirmed with fewer than 60 votes since late 2013.

With Senate Republicans stalling on Mr. Obama’s nominees in the 114th Congress, judicial vacancies have risen to 105, providing President-elect Donald Trump with an opportunity to make his mark quickly on the judiciary. In addition to the Supreme Court vacancy, 13 seats are open in the circuit courts.

With Democrats having removed the filibuster as a weapon against nominations below the level of the Supreme Court and Republicans holding a majority 52 seats in the Senate, Mr. Trump should get relatively fast action on judges.

“Harry Reid decided to nuke the filibuster, which I think Democrats are sorry about now,” Ms. Severino said. “Now it’s coming back to bite him. I was glad to see it go, as much as it was frustrating to see the D.C. Circuit really be so ideologically tipped in the process.”

Mr. Reid has said he doesn’t regret the move.

Without the filibuster, Democrats will either “need to pick up some Republicans” to defeat a nominee or resort to the practice known as the “blue slip,” Mr. Tobias said.

Senators can object to a nominee from their home state in writing on a piece of paper. Then the chairman of the Senate Judiciary Committee, currently Chuck Grassley, Iowa Democrat, decides whether or not to honor that objection.