Virginia’s governor acknowledged on Friday that he was photographed more than 30 years ago in a costume that was “clearly racist and offensive” — admitting that he had dressed either as a member of the Ku Klux Klan or in blackface — but resisted growing calls for his resignation.
“I am deeply sorry for the decision I made to appear as I did in this photo and for the hurt that decision caused then and now,” Ralph Northam, the Democratic governor, said in a statement on Friday evening. “This behavior is not in keeping with who I am today and the values I have fought for throughout my career in the military, in medicine, and in public service. But I want to be clear, I understand how this decision shakes Virginians’ faith in that commitment.”
Dr. Northam issued his statement hours after the photograph, which was included on his 1984 medical school yearbook page and appeared alongside other pictures of Dr. Northam, became public. Neither person in the black-and-white photograph was identified, and Dr. Northam, who was elected Virginia’s governor in 2017, did not confirm which costume he had worn.
By Friday night, Mr. Northam was facing pressure to resign from multiple presidential candidates in his own party, including Senator Kamala Harris of California and Julián Castro, the former mayor of San Antonio.
“It doesn’t matter if he is a Republican or a Democrat,” Mr. Castro said. “This behavior was racist and unconscionable. Governor Northam should resign.”
The Republican Party of Virginia condemned the photograph before Dr. Northam issued his statement.
“Racism has no place in Virginia,” Jack Wilson, the state party chairman, said in a statement. “These pictures are wholly inappropriate. If Governor Northam appeared in blackface or dressed in a KKK robe, he should resign immediately.”
But some Virginia Democrats defended Dr. Northam and said he should not quit.
“The picture was in extremely poor taste, no question about that, but his life since then has been anything but,” said Richard Saslaw, the Democratic leader of the Virginia Senate. “He’s had a career of helping people of all races.”
Mr. Saslaw said the governor should “obviously apologize” but, alluding to the members of the State House and Senate, he added: “Which of the 140 of us would want to have revealed what we were doing in our early to mid-20s?”
If Dr. Northam were to resign, Lt. Gov. Justin E. Fairfax would assume the governor’s office. Mr. Fairfax, a Democrat, was the second black person to be elected to statewide office in Virginia.
But in his statement on Friday, Dr. Northam signaled that he did not intend to leave office.
“I recognize that it will take time and serious effort to heal the damage this conduct has caused,” he said. “I am ready to do that important work. The first step is to offer my sincerest apology and to state my absolute commitment to living up to the expectations Virginians set for me when they elected me to be their governor.”
Even if Dr. Northam defies what could quickly become a crush of pressure to quit, he will not face any immediate electoral repercussions. Virginia bars governors from serving two consecutive terms, and both of the state’s United States senators are Democrats, leaving his political options limited.
Still, the news of the yearbook image, which the website Big League Politics first reported on Friday, could undermine Dr. Northam’s authority in Richmond and tarnish his tenure, which, just more than a year in, has been marked by a number of accomplishments on Democratic priorities.
Dr. Northam rode to victory in 2017, when he soundly defeated Ed Gillespie, a former chairman of the Republican National Committee, thanks to the suburban backlash against President Trump. Virginia Democrats nearly reclaimed control of the State House the same year. Their success prompted Republicans to finally give up their opposition to Medicaid expansion and the measure passed with bipartisan support, offering the governor a signature accomplishment.
Then Dr. Northam announced last year that Amazon had selected Arlington, Va., just outside of Washington, for one of its new facilities as part of its “HQ2” search, bringing the promise of thousands of new jobs and revenue to the state.
The Amazon news was especially sweet for state leaders because it let them further burnish the state’s image as a progressive beacon in the South and a leader in the new economy.
But Dr. Northam abruptly became a polarizing figure this week when, amid a debate about abortion access in Virginia, he gave a radio interview that led to accusations that he supported infanticide.
Asked in the interview about a proposal to allow abortion in the final trimester to protect the health of the mother, the governor said late-term abortions would be permissible in cases of severe deformities or nonviable fetuses, and described a situation in which such an infant would be delivered, and then a “discussion would ensue between the physicians and the mother.”
Republicans immediately argued that Mr. Northam was willing to support an infant’s killing after birth. Dr. Northam disputed that characterization, writing on Twitter, “I have devoted my life to caring for children and any insinuation otherwise is shameful and disgusting.”
Dr. Northam earned his medical degree from Eastern Virginia before completing residencies elsewhere. But he returned to the Norfolk area, where he practiced pediatric neurology at a children’s hospital. He also joined the faculty of his medical school, where, according to his official biography, he taught medicine and ethics.
Dr. Northam was a largely apolitical doctor before being elected to the State Senate in 2007. He voted twice for George W. Bush before running for the legislature as a Democrat.