A suite of cable channels operated by AMC Networks is coming back on the Dish Network, ending a blackout of months that had affected millions of customers.

AMC Networks’ flagship channel, AMC, returned to Dish on Sunday in time for the second episode of the new season of “The Walking Dead.” The first episode drew 10.9 million viewers on Oct. 14 — even with the channel blacked out for Dish’s 14 million customers. AMC offered a Web stream of the episode to Dish customers. It is the highest rated drama in cable history.

The other channels owned by AMC Networks, the Sundance Channel, WE tv and IFC, will return to Dish Network homes on Nov. 1, the company said on Sunday. The terms of the carriage agreement were not disclosed, but Dave Shull, the senior vice president for programming at Dish, said in a statement that it was a “multiyear deal.”

Josh Sapan, the chief executive of AMC Networks, said in a statement, “We are glad to partner again with Dish Network and are delighted to bring back our popular channels and programming to their customers.”

The end of the blackout coincided with a settlement in a four-year breach-of-contract lawsuit between Dish, controlled by Charles W. Ergen, and VOOM, a former subsidiary of Cablevision, which like AMC Networks is controlled by Charles F. Dolan. Dish contended that its decision to stop carrying AMC’s channels on July 1 was unrelated to the legal fight, but AMC said otherwise.

VOOM, a set of high-definition TV channels founded by Mr. Dolan, sought more than $2 billion in damages after Dish stopped distributing the channels in 2008. Dish asserted that it had the right to terminate the carriage contract because Cablevision had not lived up to its commitment to invest $100 million a year in VOOM. The case went to trial at the beginning of the month, but court was adjourned on Wednesday, causing speculation that a settlement was imminent.

In the settlement, announced Sunday afternoon, Dish will pay $700 million to Cablevision and AMC Networks, $80 million of which is for the purchase of spectrum licenses from Cablevision. The licenses will expand Dish’s ability to sell wireless broadband service to customers.

Along with the restoration of AMC Networks’ channels, Dish will also start to carry Fuse, a channel operated by the Madison Square Garden Company, which is overseen by Mr. Dolan’s son James.