Herring winning by 907 votes, or 0.04%. Herring was sworn into office on January 11, 2014. 2017 Herring faced no opposition in the Democratic primary and won his party's endorsement for re-election. He defeated Republican opponent John Donley Adams and won re-election by 53% to 47%. 2021 On September 2, 2020, Herring announced that he would be seeking re-election as attorney general instead of running for governor. On November 2, 2021, Herring lost his reelection bid to Republican challenger Jason Miyares, a Virginia House delegate. He slightly outperformed the other candidates Terry McAuliffe and Hala Ayala, who were all on the Democratic ticket. Tenure Virginia Marriage Amendment On January 23, 2014, Herring announced that he would not defend the Virginia Marriage Amendment in federal court, and filed a brief in a federal lawsuit being brought against the law asking for it to be struck down. Herring said in a press conference announcing the move, "I believe the freedom to marry is a fundamental right and I intend to ensure that Virginia is on the right side of history and the right side of the law." Reaction to the announcement was mainly along party lines, with Democrats mostly praising the move and Republicans mostly criticizing it as violating his oath of office. The National Organization for Marriage has called for Herring's impeachment, claiming that the Virginia attorney general is obligated to defend all state laws against challenges. In the press conference, Herring said, "There are those who will say that the attorney general is required to defend every challenge to a state law, even a law that is unconstitutional. They could not be more wrong." The U.S. District Court in Norfolk ruled the amendment unconstitutional in the case Bostic v. Schaefer on February 13, 2014. On July 28, 2014, the Fourth Circuit Court of Appeals issued a 2–1 opinion upholding the lower court's decision. This was appealed to the Supreme Court of the United States, which denied a writ of certiorari, letting the Fourth Circuit Court's decision stand and legalizing same-sex marriage in Virginia. Gerrymandering case In 2019, Mark Herring and the Democratic Party won their case against gerrymandering in Virginia elections when the U.S. Supreme Court dismissed the Virginia House GOP's appeal. Blackface controversy A few days after the controversy began over a blackface picture appearing on Ralph Northam's page in a 1984 medical school yearbook in the context of