San Francisco-based Stanford Hotels Corp. has won court approval to buy the L’Enfant Plaza Hotel in downtown D.C. from The JBG Cos., ending a 14-year-old court battle over the property’s rightful owner.

And yet, so much change has come to D.C.’s real estate market — and L’Enfant Plaza for that matter — since 1999. That’s when Stanford first sued to wrest ownership of the hotel from JBG. The road going forward could be just a complex as the winding path that resulted in D.C. Senior Judge Leonard Braman’s July 31 ruling.

The hotel’s management, for starters, changed from Loews to Crestline Hotels & Resorts, and then again to the Davidson Hotel Co. For another, the sale will create a hole-in-the-doughnut scenario for JBG’s planned development of the rest of L’Enfant Plaza, which calls for the construction of a 200,000-square-foot office building and a 234-room Homewood Suites Hotel on either side of the L’Enfant Plaza Hotel.

The dispute between JBG and Stanford goes back to 1997, when Stanford cast a winning bid of $48.7 million to buy the property from Dutch holding company Sarakreek Holdings NV. Sarakreek instead transferred ownership of the property to Potomac Creek Associates LLC and then sold the LLC to JBG. Stanford sued Potomac Creek in 1999 in a case that made its way up to the D.C. Court of Appeals, which ruled in 2011 that the courts had the right to force the sale to Stanford instead and passed it back to D.C. Superior Court. Braman’s ruling laid the groundwork for the deal by requiring Stanford to draft a sale agreement and mandating that JBG agree to go along.

For the hotel to compete with new offerings, including JBG’s planned development, the L’Enfant will need some TLC. JBG has spent about $2 million on the property over the past eight years, and estimates it needs at least $28 million in renovations, according to one architectural estimate from 2008.