A federal magistrate has donated a kidney to an ailing prosecutor who often appeared before him, solving a medical problem but causing perhaps a sticky legal one.

E.J. Walbourn, 54, was diagnosed with kidney disease in 2000, and his condition deteriorated faster than doctors expected. The prosecutor was on dialysis while awaiting a new kidney.

After years of appearing in Judge J. Gregory Wehrman's courtroom, Walbourn approached the jurist late last year with a personal plea: Would he be willing to donate one of his kidneys?

"He was seriously ill and could use some assistance," Wehrman recalled in an interview. "It's not very often that that opportunity comes by in life."

After extensive tests, the judge was found to be a match.

Doctors removed a kidney from the 62-year-old judge on June 20 and implanted it in Walbourn. Within days, both men were out of the hospital.

"You can't describe the words — just gratitude," Walbourn said Thursday while having lunch at the judge's home in this Cincinnati suburb. "Someone who was actually willing to give me part of them so that I could get my life back. The words 'thank you' seem so inadequate."

The judge learned of Walbourn's situation a year ago when the assistant U.S. attorney asked if he could bring his cell phone into the courtroom. Walbourn explained that he did not want to miss a call that might tell him a donor kidney had been found.

As they talked, the judge offered to donate one of his kidneys. Walbourn thanked him but said his wife was undergoing tests to see if she was a possible donor candidate. Months later, those plans changed when another round of testing ruled out Walbourn's wife as a potential donor.

So the prosecutor asked Wehrman if he was still willing to donate a kidney.

The judge had no second thoughts. "I had just watched E.J. deteriorate over a period of years," he said.

Walbourn now has more energy and is able to eat foods he once had to avoid. He expects to ease back into work next month and looks forward to family vacations and watching his two children graduate from college.

And the relationship between judge and prosecutor has changed forever, even in the courtroom.

"This is a man who saved my life," Walbourn said. "It can't be only professional anymore. I have the utmost respect and admiration and love for him for having done this."

For years, Walbourn appeared in Wehrman's courtroom at least once a week. Now those appearances will be limited.

"Because his integrity is just above reproach, I would never put him in a position to have anyone ever want to question him," Walbourn said.

James Fischer, a professor at the Southwestern University law school in Los Angeles, said Wehrman "sounds like a real hero" and he would not "have the slightest hesitation" about arguing a case before the judge, even if Walbourn was the prosecutor.

But he acknowledged that others might take a different view.

"It could be a knotty little thing," he said. "Because I could see a disappointed litigant saying, 'Well, you obviously must like this U.S. attorney a lot to have donated a kidney. Now you ruled against me, and I'm going to take it up on appeal."'

The judge said he considers Walbourn a part of his family — "until death do us part." The prosecutor agrees.

"Both of our families have been through a lot together," Walbourn said.