D.C. Mayor Vincent Gray's pick to run the Department of Housing and Community Development had an extramarital relationship with a subordinate while he was leading Philadelphia's housing agency, triggering yet another controversy inside a city hall already under siege amid a series of personal scandals.

Mayoral spokesman Pedro Ribeiro confirmed Tuesday that Michael Kelly had a sexual relationship with an employee while serving as executive director of the Philadelphia Housing Authority, and that Gray was aware of the indiscretion before he announced his selection Monday.

"Prior to his appointment, Mr. Kelly shared that he had a consensual relationship with a woman at the Philadelphia Housing Authority," Ribeiro said. "Michael made a personal mistake."

Kelly could not be reached for comment.

In an interview, Gray said he had limited knowledge of Kelly's affair.

"I don't know a lot of the details about it," Gray said. "I heard about it a little bit."

He also said he was standing behind his pick.

"I absolutely support Michael," Gray said. "Michael is an absolutely sterling professional."

Kelly led the D.C. Housing Authority for nine years, from 2000 to 2009. He ran similar agencies in San Francisco and New Orleans before coming to D.C., and in New York and Philadelphia after his first stint in the District.

Kelly resigned from the Pennsylvania job on Friday, citing family reasons. But WPVI-TV, the Philadelphia television station that first reported the affair, said he was forced out. A Philadelphia Housing Authority spokeswoman didn't respond to a request for comment.

Though Ribeiro acknowledged the affair, he denied a report that Kelly had awarded his mistress pay raises, saying that the U.S. Department of Housing and Urban Development had cleared Kelly of such actions.

The D.C. Council must approve Kelly's selection, and Council Chairman Phil Mendelson said legislators would review Kelly's entire background.

"The primary issue should be his ability and skills with regard to housing," Mendelson said. "Obviously, if there's something in his personal life and it's been getting this much attention in Philadelphia, then we should look at that."

Kelly isn't Gray's first hire to become embroiled in scandal.

Gray came under fire in 2011 for hiring the children of campaign employees, and a top aide resigned after it became public that she voted in a D.C. election while living in Maryland.

The most significant allegations of cronyism, though, continue to dog Gray, as he and his campaign remain under federal investigation for allegedly promising money and a city job to Sulaimon Brown, a minor mayoral candidate, for attacking then-incumbent Mayor Adrian Fenty.

Although Gray hasn't been charged with any wrongdoing, two campaign aides have pleaded guilty to their roles in the scheme.

Political consultant Chuck Thies, who has informally advised Gray in the past, said Kelly's relationship opened the mayor to new criticism.

"I don't think 'embarrassing' is the right term," Thies said. "It certainly did create unnecessary ridicule."