Mayor Vincent C. Gray is standing by his newly nominated housing chief, who admitted Tuesday to leaving his previous job after having an affair with a subordinate.

Michael P. Kelly, whom Gray tapped Monday to lead the city’s Department of Housing and Community Development, said in an interview that his relationship with a senior staff member at the Philadelphia Housing Authority constituted “an incredible lapse of judgment.” But he said he did not use his position as executive director to benefit the woman and that he is returning to the District in part to repair relations with his family.

“I resigned based on the fact that this was a personal indiscretion,” said Kelly, who is married. “Even though there was no wrongdoing, it just didn’t pass the ethics smell test.”

The Gray administration said Tuesday that Kelly, 58, had disclosed the circumstances of his departure before his hire. “Michael made a personal mistake,” said an administration statement. “He is a talented and committed public servant who is dedicated to expanding affordable housing in the District, and we stand behind his nomination.”

Kelly said he told Gray (D) that he wanted to return to Washington for “family reasons” — the same explanation he gave Philadelphia reporters when his resignation was made public Friday — but did not mention the affair, which he said ended months ago.

Michael P. Kelly is shown with then-D.C. Mayor Adrian Fenty in 2008. (Hamil R. Harris/TWP)

“I didn’t lie to him, but I didn’t go into detail,” Kelly said, adding that he informed the mayor’s chief of staff, Christopher Murphy, immediately after his conversation with Gray.

Philadelphia’s WPVI-TV first reported that Kelly’s resignation was related to a “consensual affair” he’d had with a senior aide. The station reported that staffers under Kelly complained to the U.S. Department of Housing and Urban Development about the affair. Their allegations included that he had approved raises for the woman “despite having little or no credentials for the post.”

Kelly said the woman, who was employed by the authority when he became its director, was qualified for the posts she held. He said he promoted her to an acting position but did not give her a raise.

The authority’s inspector general investigated the allegations earlier this year and reported to HUD, which oversees the Philadelphia authority as a receiver.

Jerry Brown, a HUD spokesman, said the probe determined that Kelly had engaged in an “improper relationship” but found nothing to substantiate other allegations. “We’ve heard everything from a raise to an individual receiving hush money,” he said. “None of that appears to be true at all.”

But the improper relationship was enough for HUD to accept Kelly’s resignation, Brown said, given that the Philadelphia authority is still recovering from reports of rampant sexual harassment by its previous executive director. Carl R. Greene was suspended and fired in 2010 after it was disclosed that he had settled a series of harassment lawsuits without informing the PHA board.

Stephen Z. Chertkof, a Washington lawyer whose practice focuses on workplace issues, said a consensual relationship “doesn’t violate the law, but it could violate policy.”

“If they were trying to conceal it and committed acts of dishonesty to conceal it, that’s also cause for concern,” he said.

Kelly said he formally resigned in late March, shortly after the investigation concluded, and searched for jobs in Washington. His resignation was not made public until a PHA board meeting Friday.

Gray is known to have been an admirer of Kelly’s from his nine years leading the D.C. Housing Authority, ending in 2009. Kelly said he’d considered job opportunities in the Gray administration shortly after his 2010 election but demurred after he was asked to take the Philadelphia job.

A spokesman for Philadelphia Mayor Michael A. Nutter said Monday that Kelly had made “real progress” there. That sentiment was echoed by HUD’s Brown: “It was just a mistake, a relationship that just shouldn’t happen within the workplace,” he said. “It’s unfortunate, because Michael had accomplished a lot at the Housing authority.”

Kelly is looking at a $60,000 pay cut, to $165,000 from $225,000, in moving from his Philadelphia job to head the D.C. Department of Housing and Community Development.

WPVI reported that the woman “suddenly resigned three weeks ago and went back to her native country.” Kelly confirmed that the woman had left the Philadelphia authority.

The affair is the latest in a series of issues raised about Gray’s appointees. Most recently, his pick for deputy chief of staff was forced to withdraw last year over concerns about her voting record. But Kelly has strong local political and business ties and maintains a good reputation here. His nomination won plaudits Monday from affordable housing advocates in the city.

D.C. Council Chairman Phil Mendelson (D-At Large) said he wants to hear more details about what transpired in Philadelphia, but otherwise has a good impression of Kelly.

“When Michael Kelly left the District, there were many who felt it was a loss,” Mendelson said. “Michael Kelly made enormous improvements to D.C. public housing, so as a person with expertise in this area, he is an excellent candidate.”

Mendelson said the council will hold a hearing on the nomination, at which “whatever personal allegations are substantiated” can be discussed.

“At the hearing, people can come forward and argue whatever personal issues they feel should be disqualifying,” Mendelson said. “But perhaps no one will come forward and argue anything.”

Staff writer Tim Craig contributed to this report.