The producers of Woodstock 50, the troubled anniversary festival, have secured a last-minute deal to put on their show — or at least a version of it — in Maryland, after months of legal and permit battles in upstate New York that had left the event in grave doubt.

Woodstock 50 will now be at the Merriweather Post Pavilion, an outdoor amphitheater in Columbia, Md., the producers confirmed on Thursday. It will be held from Aug. 16 to 18, almost exactly 50 years after the first Woodstock. But it was unclear what artists would be performing; when the lineup was announced early this year, it was to include Jay-Z, Miley Cyrus, Dead and Company, John Fogerty, Santana and dozens of others, although none of them have been confirmed for the latest iteration of the event.

For much of the year, Woodstock 50 has been the talk of the concert business, mostly for the wrong reasons, as its producers have faced obstacle after obstacle, some seemingly self-imposed.

The festival’s producers — including Michael Lang, one of the original partners behind the festival in 1969 — have battled with their partners and former investor, the Japanese advertising conglomerate Dentsu, which withdrew its support in April and has called them incompetent. Producers lost two venues in upstate New York after failing to obtain permits; they suffered their latest setback just three days ago when the event was rejected — for a fourth time — by the town of Vernon, N.Y.