In another shock to the traditional TV ecosystem, prolific producer Ryan Murphy is moving to Netflix under a record-setting deal valued at $250 million-$300 million.

The five-year pact calls for the showrunner to produce new series and films exclusively for Netflix. The deal starts July 1, when his current deal with 20th Century Fox TV expires. Murphy’s move comes as his longtime studio home of Fox begins a period of transition with its expected sale of the 20th Century Fox studio and FX Networks cable group to Disney.

“Ryan Murphy’s series have influenced the global cultural zeitgeist, reinvented genres and changed the course of television history. His unfaltering dedication to excellence and to give voice to the underrepresented, to showcase a unique perspective or just to shock the hell out of us, permeates his genre-shattering work,” said Netflix Chief Content Officer Ted Sarandos. “From ‘Nip/Tuck’ — our first licensed series — to ‘American Crime Story: The People v. O.J. Simpson’ and ‘American Horror Story,’ we’ve seen how his brand of storytelling captivates consumers and critics across the globe. His celebrated body of work and his contributions to our industry speak for themselves, and we look forward to supporting Ryan in bringing his broad and diverse stories to the world.”

The deal is a blow to Disney. Murphy was personally courted by Disney chairman-CEO Bob Iger to join the enlarged studio. Murphy has been a reliable hitmaker for Fox and FX, and Iger had hoped to keep him in the fold.

“The history of this moment is not lost on me,” Murphy said. “I am a gay kid from Indiana who moved to Hollywood in 1989 with $55 in savings in my pocket, so the fact that my dreams have crystallized and come true in such a major way is emotional and overwhelming to me. I am awash in genuine appreciation for Ted Sarandos, Reed Hastings, and Cindy Holland at Netflix for believing in me and the future of my company, which will continue to champion women, minorities, and LGBTQ heroes and heroines, and I am honored and grateful to continue my partnership with my friends and peers at Fox on our existing shows.”

Murphy’s decision to set up shop at Netflix raises immediate questions about the future plans of Dana Walden, Fox Television Group chairman-CEO who has been closely associated with Murphy. Walden is also being courted by Disney, but there has been speculation that Murphy and Walden might join forces as partners in their own production venture.

Murphy declined to elaborate beyond his statement. He may have been encouraged to make the move to Netflix in part by the level of uncertainty surrounding the Disney-Fox transaction, which is expected to take months if not a year or more to close. This week, Comcast raised the specter of possibly launching a bidding war with Disney for Fox — a move that would undoubtedly create more disruption for the Fox group that has been his studio team for more than a decade.

Murphy had already gone into business with Netflix on two series that were set up during the past few months: “Ratched,” an origins story for the Nurse Ratched character from “One Flew Over the Cuckoo’s Nest,” and “The Politician,” a political satire toplined by Ben Platt.

Murphy’s decision to shift his overall deal to Netflix is another sign of the streaming service’s immense market power. Last August, Netflix signed a megabucks deal to put Shonda Rhimes, ABC’s most prominent producer, under an exclusive and rich production pact.

Ryan Murphy Productions is so prolific as to demand the kind of $50 million-$60 million in annual financing built into the Netflix deal. The banner most recently launched a procedural hit for Fox in drama “9-1-1.” Murphy is behind the “American Crime Story” and “American Horror Story” franchises at FX, as well as the “Feud” anthology. Also in the works for FX is “Pose,” a drama set in the blossoming of the transgender culture in New York in the 1980s.