A ruling by the Foreign Intelligence Surveillance Court on Wednesday mistakenly said Fusion GPS, the opposition research firm which hired British ex-spy Christopher Steele in 2016, was looking for dirt on former Secretary of State Hillary Clinton rather than on then-candidate Donald Trump.

The court fixed the glaring error only after the Washington Examiner brought it to its attention.

Judge James Boasberg, the court’s presiding judge, cited the Foreign Intelligence Surveillance Act applications against former Trump campaign associate Carter Page in a Wednesday opinion and, in the midst of pointing out the multitude of flaws, omissions, and factual errors in the electronic surveillance filings uncovered by the Justice Department’s watchdog, he made a mistake himself.

“Although from the outset the applications acknowledged the likely political bias of the person who had hired Steele … information that confirmed the political origins of the Steele reporting was not,” Boasberg stated.

He then incorrectly quoted a footnote from the first FISA application, writing: “The FBI speculates that the [person who hired Steele] was likely looking for information that could be used to discredit [Clinton’s] campaign.”

In reality, the FISA application stated, “the FBI speculates that the identified U.S. person was likely looking for information that could be used to discredit Candidate #1’s campaign.”

“Candidate #1” was Trump, not Clinton.

“Thank you for pointing this out,” David Sellers, a public affairs officer for the Administrative Office of the U.S. Courts, told the Washington Examiner when the factual inconsistency was relayed to the court. “It is an error that will be corrected.”

Boasberg acknowledged the error in a filing on the FISA court’s website Thursday afternoon.

“On March 4, 2020, this Court issued an Opinion and Order in the above-captioned docket. It has come to the Court's attention that the Opinion and Order contained an error on page 6. The Court is therefore issuing a Corrected Opinion and Order herewith,” the judge said.

After the Washington Examiner reached out, the judicial order was updated to correctly state Fusion GPS was looking to damage “[Trump’s] campaign” rather than “[Clinton’s] campaign.”

DOJ Inspector General Michael Horowitz released a report in December that criticized the Justice Department and the FBI for at least 17 “significant errors and omissions” related to the FISA surveillance of Page, who was suspected of being an agent for Russia but was never charged with wrongdoing, and for its heavy reliance on Steele’s salacious and unverified dossier.

Steele put his research together in 2016 at the behest of Fusion GPS, which was funded by Clinton's presidential campaign and the Democratic National Committee through the Perkins Coie law firm.

Steele’s Democratic benefactors, including the fact that a presidential campaign was ultimately paying him, were not revealed to the FISA court until well after the Page surveillance had ended.

Boasberg said Wednesday there was “little doubt that the government breached its duty of candor to the Court with respect to those applications” and the “frequency and seriousness of these errors … have called into question the reliability of the information proffered in other FBI applications.”

Marc Elias, who heads Perkins Coie’s political law group, was the general counsel for California Sen. Kamala Harris’s failed presidential bid and held the same position in Clinton's campaign.

Clinton’s former presidential campaign manager Robby Mook said in 2017 that he authorized Elias to hire an outside firm to dig up dirt on Trump’s connections with Russia in 2016. “I asked our lawyer, and I gave him a budget allocation to investigate this, particularly the international aspect,” he said.

Mook said Elias was receiving information from Fusion GPS about the research into Trump and Russia in 2016 and that Elias then periodically briefed the Clinton campaign about the findings.

“We were getting briefings that were put together by the law firm with information,” Mook said. “I’m proud that we were able to assemble some of the research that has brought this to light.”

The FBI told Steele in October 2016 it was looking into Page as well as Trump campaign associate George Papadopoulos, future Trump national security adviser Michael Flynn, and Trump campaign manager Paul Manafort. Steele passed along at least some of this information to Fusion.

Perkins Coie was paid more than $12 million between 2016 and 2017 for its work representing Clinton and the DNC. According to its co-founder Glenn Simpson, Fusion GPS was, in turn, paid $50,000 per month from Perkins Coie, and Fusion paid Steele roughly $168,000 for his work.

Perkins Coie said in an October 2017 letter that it had hired Fusion GPS, claiming the opposition research firm “approached Perkins Coie” in March 2016 with the knowledge that Perkins Coie was representing Clinton and the DNC, and that Perkins Coie then “engaged” Fusion in April of that year “to perform a variety of research services during the 2016 election cycle.”

Elias himself personally “retained Fusion GPS … to conduct the research” and did so “on behalf of the Clinton campaign and the DNC,” according to a report from the Washington Post.

Brian Fallon, the former national press secretary for the Clinton campaign, defended Elias.

“Marc is known as one of the most skilled professionals in Democratic politics, in addition to being the party's top election lawyer," Fallon said in 2017. “I am damn glad he pursued this on behalf of our campaign and only regret more of this material was not verified in time for the voters to learn it before the election.”