Twenty-year-old Timothy Zalut was on trial on assault charges in Bucks County Court.
When it appeared that he might have to go to jail, Zalut decided to tie the knot with his fiancee.
The judge presiding over the trial agreed to perform the ceremony in chambers while the jury was still out.
Zalut's fiancee said they wanted to get married and were worried that they wouldn't get the chance.
A plea bargain finally brought the trial to a halt, and the judge sentenced Zalut to five years of probation.
Get Action News on your website