San Francisco Public Health Director Barbara Garcia’s abrupt resignation Wednesday came after a months-long conflict-of-interest investigation into allegations that she had failed to disclose her wife’s income from an educational institution that had been awarded a million-dollar, sole-source contract with the health department, multiple sources have confirmed.

Garcia’s departure sent a shock wave through City Hall, where she was a key ally in Mayor London Breed’s campaign to open safe injection sites and find other ways to deal with an epidemic of drug use on the city’s streets.

The circumstances surrounding Garcia’s departure, however, were kept quiet, with the 63-year-old director saying only that she was leaving for “personal reasons.”

Breed, who had been briefed on the investigation, is also staying mum.

“The mayor does not comment on personnel issues,” said her communications director, Jeff Cretan.

However, City Hall sources tell us Garcia, who earned $313,000 a year, was given an ultimatum — either resign or face possible disciplinary action stemming from an investigation by the city attorney’s office and the Department of Human Resources.

According to those close to the case, the investigation was initiated well before Breed was sworn in as mayor, and began with a whistle-blower complaint to the San Francisco controller’s office alleging that Garcia had improperly shielded a potential financial conflict of interest involving her wife, Dorotea Reyna.

Publicly accessible records show that until early last year, Reyna, 61, had worked at the California Institute of Integral Studies, a nonprofit college in the Mission District focused on the professional development of women and minorities. Reyna was vice president of development.

In a 2016 college newsletter, the institute made reference to a seven-year contract worth a total of more than $1 million with the San Francisco Department of Health for “recruitment efforts, mentoring and services for students historically under-represented in professional psychology.”

The contract began in late 2009, months before Garcia was promoted from deputy director to the top job at the health department. She and Reyna wed in 2014.

Health department records show the contract was amended seven times after it was awarded, including four times since Garcia and Reyna were married. Along the way, sources say, it was also converted to a sole-source contract, which means no competing bids were required.

Records on file with the city controller’s office show that the institute had been paid $862,406 since 2014 — the earliest year for which records were immediately available. The biggest payment — $265,608 — came in 2017, the final year of Reyna’s employment at the college.

The contract was funded with state money from Proposition 63, the so-called millionaires tax — 1 percent on income over $1 million — approved by voters in 2005. In this case, we’re told the health department provided funds to the school to help attract minority and LGBTQ students into the mental health profession.

Institute President Judie Wexler, said the school has been working closely with the city’s investigation.

“We also looked through all of our files, and we could not see anything that the university did wrong or anything that anyone at the university did wrong,” Wexler said.

“From our files we could not see anything that Ms. Reyna had do with the contract,” Wexler said. “She left the university a while ago, before we heard about this investigation. As far as I know, no one in leadership at the university has heard from her since she resigned.”

Wexler said the contract with the city expired last year and was not renewed.

According to our sources, given the potential conflict, Garcia would have been required to list her spouse’s income on her annual Form 700 economic disclosure report, which she submitted on March 23. She did not.

However, city records show that on July 9, apparently after the city had opened its inquiry, Garcia amended her 2017 Form 700 — as well as earlier ones — to reflect $100,000 of income for Reyna.

Sources familiar with the probe also claim that Garcia had failed to be truthful with investigators when she was questioned about aspects of the contract.

The investigation has been a closely guarded secret, and it was only within the past two weeks that the mayor was informed of the pending case and a recommendation from human resources that Garcia be removed from her job.

We’re told Breed chose not to intercede, and Garcia was given the choice either to step down immediately or face disciplinary action that could result in her firing.

Garcia could not be reached for comment, and neither she nor her spouse responded to a message left Tuesday on Reyna’s cell phone.

Attempts to reach Garcia through the Municipal Executives Association, whose attorneys represented her, also were unsuccessful.

While not commenting on the reasons for her dismissal, mayoral spokesman Cretan praised Garcia for advancing “progressive health policies that have made San Francisco a national leader on issues such as advancing safe injection sites, working to end new HIV infections and helping those suffering from mental health issues on our streets.”

Dr. Edward Chow, president of the San Francisco Health Commission, added in a statement that “the city has been benefited from her service,” and highlighted Garcia’s role in “completing the rebuilding of Zuckerberg San Francisco General Hospital and Trauma Center, inaugurating the San Francisco Health Network and achieving Public Health Accreditation status for the department.”

“Her focus has always been patient-centered, as she worked to make health care services accessible to all, especially for the underserved,” Chow said.

It’s not the first time that a high-ranking city official has been the subject of active inquiries for a conflict in the awarding of a city contract.

Five years ago, Juliet Ellis, an assistant general manager at the San Francisco Public Utilities Commission, faced similar city and state investigations over her awarding of a $200,000, no-bid contract to Green for All, an East Bay nonprofit on which she served as a paid board member.

At the time Ellis helped steer the contract in 2013, she also earned between $10,000 and $100,000 as the nonprofit’s board chair, according to economic disclosure statements.

But PUC General Manager Harlan Kelly said that although an internal probe “confirmed that there were violations” of reporting requirements and “a possible violation” of state conflict laws, “the fact-finding also uncovered mitigating circumstances suggesting that there was no unethical intent behind any of the violations.”

Green for All’s contract with the PUC was scrubbed, but Ellis is still a top deputy at the PUC.

San Francisco Chronicle columnists Phillip Matier and Andrew Ross appear Sundays, Mondays and Wednesdays. Matier can be seen on the KPIX TV morning and evening news. He can also be heard on KCBS radio Monday through Friday at 7:50 a.m. and 5:50 p.m. Got a tip? Call (415) 777-8815, or email matierandross@ sfchronicle.com. Twitter: @matierandross