Dish Network and Tribune Media have come to terms on a new retransmission consent deal, ending one of the longest blackouts for stations serving major markets.

Tribune’s 42 TV stations and WGN America cabler went dark on Dish Network’s satellite TV platform on June 12. Tribune accused Dish of failing to negotiate; Dish accused Tribune of seeking triple-digit rate increases.

The companies issued a joint statement Saturday evening: “We want to thank our viewers and customers for their patience and support as we worked through this lengthy process. We’re pleased to move forward and again be able to provide the content of Tribune’s local stations and WGN America for years to come.”

The 12-week shutdown affected Dish subscribers in 33 markets, including seven of the top 10 markets, and about 7 million subscribers that received WGN America. Dish has about 13.8 million subscribers but only about 5 million are in Tribune station markets.

The standoff between the sides dragged on throughout the summer, raising the possibility that Dish subscribers in Tribune markets would miss the new seasons of CW’s primetime hits including “The Flash.” Tribune owns CW affiliates in New York, Los Angeles, Dallas, Washington, D.C., Houston and other large markets.

Tribune also owns the CBS affiliate in Indianapolis. With football season approaching, Dish may not have wanted to deal with angry Colts fans wondering why they can’t find their games on the local CBS station.

The brawling between Dish and Tribune was heated after the stations and WGN America went dark. Dish sued Tribune in June for its “Dump Dish” promotional campaign urging viewers to switch to another MVPD provider, claiming the statement were intentionally misleading and amounted to interference with Dish’s contractual relationships with subscribers.

But last month, Dish executives hinted that a resolution was in the works.

Financial details of the agreement were not disclosed. But Tribune Media CEO Peter Liguori said in a memo to Tribune employees that the company achieved its goal of gaining broader distribution of WGN America on Dish’s platform. Tribune has been investing heavily in WGN America during the past two years with original programming.

Here’s Liguori’s full memo:

I want to let you know that today we reached a comprehensive long-term agreement with Dish Network, restoring our 42 television stations and WGN America to Dish’s distribution system.

As you know, this was a lengthy process and I want to thank you for your unflagging support, hard work and help in getting us back up on Dish. Across the company and especially within our broadcast group and WGN America, everyone contributed.

While the specifics of the agreement are confidential, we’re pleased with its terms and believe we achieved everything we had hoped to, including broad distribution for WGN America. The timing is great, too, with college and NFL football about to get the regular season underway, new fall prime-time programming set to debut in a few weeks, and “Salem” returning for its third season on WGN America.

A special thanks to Larry Wert and our General Managers, as well as Dana Zimmer, Kevin Connor, Mike McKenna, Victor Viola, Mark Boyes, Bill Yeager, Rick Estabrook, Jessica Bellucci, Gary Weitman and our entire distribution team for their excellent work during the negotiating process. I couldn’t be more proud of our employees and the way we handled this complicated negotiation.

Have a great Labor Day holiday.