After more than two years and $1 million in legal defense fees, the Philadelphia Housing Authority has agreed to pay $625,000 to end a contract dispute with its ousted executive director, Carl R. Greene.

The deal was first announced as a tentative agreement by the agency's interim executive director, Kelvin Jeremiah, at PHA's monthly board meeting Friday. The sides then signed the agreement at 5 p.m.

Clifford Haines, an attorney for Greene, called the settlement "reasonable and fair."

Jeremiah said the agreement was "the right decision" and noted that Greene originally sought $4 million.

"Mr. Greene was asking for $4 million, then $2.5 million, then $1.5 million," Jeremiah said. "This was a hard-fought case."

Greene sued PHA in federal court on the grounds that the agency had no cause to fire him and that it owed him $743,000 in lost income plus damages. The trial began Jan. 29 and included testimony from former Mayor John F. Street, PHA's chairman from 2004 until 2011, as well as former Gov. Ed Rendell.

The trial was to resume Monday, but Haines said U.S. District Judge Ronald Buckwalter would be notified of the settlement. He said he did not expect that the parties would need to appear in court.

Haines said testimony and the settlement went "a long way to restoring the integrity of Mr. Greene's name."

Greene was fired Sept. 23, 2010, on a 4-1 vote by PHA's board after commissioners discovered that he had settled multiple sexual harassment complaints without telling them.

Three of the women who filed complaints against Greene and were paid settlements were set to testify.

John Elliott, an attorney for one, Elizabeth Helm, said Greene had engaged in "egregious misconduct and now apparently is being rewarded."

"It's a sad day for the taxpayers to have public funds spent in that manner," he said.

In a statement, PHA said the settlement "closes a tenuous chapter in PHA's history."

PHA noted that the agreement ensures that Greene will be unable to pursue any further lawsuits against the agency or its former board.

However, the settlement does not protect Greene from "any claims, known or unknown . . . involving fraud, misappropriation of funds, or any criminal acts."

Federal officials continue to investigate PHA's activities during Greene's tenure.

Originally, Greene's lawsuit included claims that his civil rights were denied and that PHA's board had defamed him. Buckwalter eliminated those claims, leaving only the question of whether PHA breached its contract agreement with Greene.

Under that pact, the agency could only fire Greene for cause if it could prove that his behavior caused material financial damage to the agency.

Street said he did not support the settlement.

"I stand by the action of the board in dismissing Mr. Greene for cause," Street said in an e-mail. "The irony of Mr. Greene getting more money than any of the victims in this case is stunning."

Street noted that Greene, who took the stand for one day, was not cross-examined and the women were not able to testify.

"This settlement sends the wrong message to every potential victim of sexual harassment as well as every potential perpetrator," Street said.

PHA had spent more than $1 million on its defense and had exhausted the coverage provided by its insurer. That meant that with the start of the trial, the agency was paying for its lawyers out of its own budget.

Street, in an investigative report presented to the board, called Greene a "serial sexual harasser."

The board dismissed Greene not only for the sexual harassment complaints and the way they were handled, but also said that he created a hostile work environment and abandoned his duties, and that his personal financial problems set a bad example for tenants. His behavior, it asserted, damaged PHA.

For the first time at the trial, Greene testified about the events leading up to his termination. Haines, his lawyer, said the current PHA leadership had done the right thing by reaching the agreement, but criticized Street and said his report to the board "was not an investigation at all."

"It was the sole opinion of chair," he said. "It was a mean-spirited, uncalled-for, personal attack that should not have happened."