Eric Ulrich has stepped down as buildings commissioner in the wake of reports that he was questioned about an illegal gambling investigation by the Manhattan District Attorney's office.

“This morning, Eric Ulrich tendered his resignation as DOB commissioner in an effort to, in his words, avoid ‘unnecessary distraction for the Adams administration.’" City Hall spokesman Fabien Levy said in a statement. "We have accepted his resignation, appreciate him taking this step, and wish him well. We have no further knowledge of any investigation and, out of respect for his and his family’s privacy, have nothing further to add.”

Investigators seized Ulrich's phone this week and questioned him in connection with the gambling probe, according to reports from the New York Times and the Daily News.

The nature of the probe was not immediately apparent, and it wasn’t clear if Ulrich was a target, or whether he was peripheral to the investigation. A spokesperson for Manhattan DA Alvin Bragg declined to comment.

Ulrich, a former member of the City Council, was appointed to lead the buildings department by Mayor Eric Adams this spring. The Times reported, citing sources, that the DA’s investigation had to do with conduct that occurred before Ulrich's time in the Adams administration.

Speaking at an unrelated press conference on Wednesday, Adams said he respects the "firewall" between City Hall and the Manhattan DA's office and wasn’t rushing to conclusions about his appointee.

"Number one, Eric is still the commissioner there," he said. “I really think that this is really so early for us to be saying 'Should we, shouldn't we. Should we, should we, shouldn't we' — [the] DA's office is going to do their review. And that review will determine how to move forward."

That changed by Thursday afternoon. Ulrich did not immediately respond to a phone call seeking comment.

Over the years, Ulrich has made headlines in connection to gambling. In 2016, the Daily News reported he reported on an annual disclosure form submitted to the city’s Conflicts of Interest Board that he’d won between $5,000 and $47,999 in gambling spoils.

Ulrich reported earning that same amount through gambling each year since, according to disclosures released by the board through 2021, the most recent one available.

In 2018, Ulrich wrote a letter in support of Robert Pisani, a purported Bonanno crime family associate, during Pisani’s sentencing in a conspiracy case involving an illegal gambling ring, the Daily News reported.

Levy, the City Hall spokesman, said First Deputy Commissioner Kazimir Vilenchik will serve as acting commissioner.

"We have full confidence in the team at DOB, and the agency remains fully operational," he added. "No city services will be impacted.”

Jon Campbell also contributed reporting.