Robert Elwood, left, and Brendan Sullivan III battled over Headfirst Baseball in federal court.

A nearly four-year legal battle between two former Little League teammates over a multimillion-dollar youth baseball and summer camp business ended abruptly Thursday with a settlement during the damages phase of a bitter trial in federal court.

Robert Elwood, accused by Brendan V. Sullivan III of stealing more than $700,000 from Headfirst Baseball, agreed to pay the enterprise back nearly $498,000 and an additional $100,000 in punitive damages.

Elwood also agreed to give up his ownership stake in another Headfirst business, waive any other claims and appeals, and stay out of the youth baseball business for three years.

“I’m grateful that we now have a court order requiring Robert Elwood to pay back what he stole from the Headfirst companies,” Sullivan said in a statement. “He has no ownership in any Headfirst company.”

Elwood’s lead attorney, J. Douglas Baldridge, said “the prospect of continued litigation, including the possibility of appeal by both parties, was not in anyone’s best interest. This is a sensible result for all concerned.”

The agreement in U.S. District Court in Washington between the former St. Albans high school baseball teammates came during the second day of proceedings over damages, which followed a five-week jury trial this past winter.

Sullivan, the son of famed Williams & Connolly lawyer Brendan V. Sullivan Jr., called Elwood “a thief” on the witness stand, laying out how their lifelong friendship ended after he discovered that Elwood — then Headfirst’s chief executive — had spent company money on hardwood floors for a waterfront home, vacations, appliances, drones, diapers, iPads and even a new doorbell.

In his own testimony, Elwood didn’t dispute the spending, even admitting that he went too far. His defense was that he was a partner in the overall business under District law, not an employee, and that he and Sullivan had agreed to use company money for personal expenses.

The conflict had nothing to do with Elwood’s spending, Elwood’s attorneys contended. It was a plot, they argued, by Sullivan; his brother Ted; and their father’s law firm to get rid of Elwood after an investment firm offered to buy Headfirst and its various entities in a deal worth as much as $19 million.

If jurors hadn’t already known that youth sports was a $7 billion industry, they learned it quickly during the trial. Early on, they were shown pictures of two bags of cash — one marked for Elwood, the other for Sullivan.

After deliberating for nearly six days, the jury returned with a mixed verdict, determining that Elwood had improperly used company funds for personal expenses, although it reduced the potential monetary award by limiting the number of years for which Headfirst and Sullivan could claim damages.

But the jury also ruled that there was a de facto partnership between the two men. That ruling seemed like a big victory for Elwood, particularly because Headfirst and its various limited liability companies were generating more than $4 million a year when the dispute emerged.

The legal question became this: What, if anything, did this partnership own?

In post-trial motions and hearings, Sullivan’s attorneys from Williams & Connolly had a simple answer: Nothing. Meanwhile, Elwood’s attorneys, from Venable LLP, argued in court filings that the partnership’s value comes from “an intangible asset called goodwill.”

“This is the asset that was valuable” to the investment firm “when it made a multimillion-dollar offer to Elwood and Sullivan to purchase all of the Headfirst business and not a particular LLC,” Elwood’s attorneys argued.

Judge Reggie B. Walton did not permit Elwood’s argument to go forward, a crucial blow.

As part of the settlement agreement, Headfirst and Sullivan agreed to offer Elwood a payment plan.

Elwood has apparently moved on from youth sports, recently starting Drobots Company, which offers drone-flying camps for children.