WASHINGTON - President Donald Trump's recent comments about "Obama judges" who ruled against him captured headlines and even drew scrutiny from the chief Supreme Court justice, but judges appointed by Democrats aren't the only to rule against the Trump administration.

The president this week argued the 9th District Court of Appeals consistently rules against the policies of his administration, calling it a "disgrace." He blamed the loses on "Obama judges," a reference to those who were appointed by former president Barack Obama.

A war of words broke out between Trump and Chief Supreme Court Justice John Roberts Wednesday over the president's angry comments about judges who rule against him.

Roberts, in a rare rebuke of a sitting president, said the country doesn't have "Obama judges or Trump judges, Bush judges or Clinton judges."

"What we have is an extraordinary group of dedicated judges doing their level best to do equal right to those appearing before them," Roberts said in a statement. "That independent judiciary is something we should all be thankful for."

Trump responded to Roberts by saying the nation does "indeed have Obama judges."

But while there have been rulings by judges appointed by Obama, a number of major rulings against the Trump administration have come from conservative-appointed judges. Here are five that came out this year:

DACA

In April, U.S. District Court Judge John Bates became the third federal judge to rule against the Trump Administration's plight to end the Deferred Action for Childhood Arrivals program, known as DACA.

Bates, who was appointed by President George W. Bush, was the first Republican-appointed judge to rule against the measure, according to Politico.

Bates wrote in his 60-page ruling that the reasoning given by the Department of Homeland Security to end the program, which protects immigrants who came to the U.S. as children, was "arbitrary"

"The Department failed adequately to explain its conclusion that the program was unlawful," Bates wrote. "Neither the meager legal reasoning nor the assessment of litigation risk provided by DHS to support its rescission decision is sufficient to sustain termination of the DACA program."

CNN's win on revoking a reporter's badge

A judge appointed by President Trump ruled against the White House earlier this month, allowing CNN reporter to have his press badge reinstated.

The White House revoked White House correspondent Jim Acosta's press badge after he got in a tense exchange with Trump where the president called him a "rude, terrible person."

More:CNN's Jim Acosta has White House press badge revoked after Trump called him 'terrible'

More:White House backs down from fight with CNN, restores press credential for reporter Jim Acosta

More:Donald Trump says he may revoke press credentials for other reporters, not just CNN's Jim Acosta

White House Press Secretary Sarah Sanders said the rare move was a result of both Acosta's behavior and him yanking back when a White House intern tried to take his microphone.

U.S. District Court Judge Timothy Kelly, a Trump appointee, granted a request for Acosta's credentials to be returned ruling that the White House had violated Acosta's Fifth Amendment right to due process by suspending his press badge without explanation or a chance for CNN to appeal.

The White House ended up backing down from the fight and new rules were rolled out. Acosta's press badge was returned.

Mueller's legitimacy

The president has long criticized special counsel Robert Mueller and his investigation into Russian meddling in the 2016 election. Trump has called the investigation a "witch hunt" and earlier this month said the inner workings of Mueller's investigation were "a total mess."

"They have found no collusion and have gone absolutely nuts. They are screaming and shouting at people, horribly threatening them to come up with the answers they want," Trump tweeted. "They are a disgrace to our Nation" and "gang of Democrat thugs," he added.

In June, the president wrote on Twitter Mueller's appointment was "totally UNCONSTITUTIONAL" but a federal judge appointed by Trump disagreed.

Mueller's appointment and legitimacy have been challenged several times over the course of the two-year investigation, including by a Russian company accused of meddling in the election by posing as Americans, launching social media campaigns to pick at Americans' political division and staging rallies.

The company, Concord Management and Consulting, sought to have charges dropped by claiming Mueller's appointment wasn't Constitutional. But U.S. District Judge Dabney Friedrich, who was appointed by Trump, disagreed.

"The appointment does not violate core separation-of-powers principles," Friedrich wrote in an August opinion. "Nor has the Special Counsel exceeded his authority under the appointment order by investigating and prosecuting Concord."

Separation of families at the border

The Trump administration's controversial and hardline immigration policy that led to the separation of immigrant families was reversed by a federal judge appointed by George W. Bush.

U.S. District Judge Dana Sabraw, based in San Diego, ordered the Trump administration earlier this year to reunite children who had been taken from their parents when crossing the U.S. southern border.

President Bush nominated Sabraw to the federal bench in 2003, and he won unanimous Senate confirmation.

Sabraw ruled that the Trump administration was "100 percent" responsible for reuniting the families and locating migrant parents who were deported after they were separated from their children.

"The reality is that for every parent who is not located, there will be a permanently orphaned child, and that is 100 percent the responsibility of the administration," Sabraw said. "The government has the sole burden and responsibility and obligation to make (reunifications) happen."

He also scolded administration officials for moving so slowly to track down the deported parents. He cited an estimate that only about a dozen of the parents have been found in Guatemala, Honduras and El Salvador, asking, "Is that true?"

More:Judge says Trump team '100 percent' responsible for finding deported immigrant parents

More:Who is Dana Sabraw? 5 things to know about judge who ordered reunification of immigrant families

Stopping sanctuary cities

This summer, Judge John Mendez ruled against the Trump administration's attempts to stop California's sanctuary city practices.

Mendez, nominated by George W. Bush in 2007, denied a request by the administration to halt California's practices not cooperating with federal law officials on immigration policies and, instead, providing a safe haven for these individuals.

"This order hopefully will not be viewed through a political lens and this court expresses no views on the soundness of the policies or statutes involved in this lawsuit," Mendez wrote in the ruling. "There is no place for politics in our judicial system and this one opinion will neither define nor solve the complicated immigration issues currently facing our nation."

In his ruling, Mendez wrote in a 60-page impassioned ruling that elected officials should "set aside the partisan and polarizing politics dominating the current immigration debate and work in a cooperative and bi-partisan fashion toward drafting and passing legislation that addresses this critical political issue."

He added: "Our Nation deserves it. Our Constitution demands it."