Spike Lee has signed with Endeavor, ending a long run with the William Morris Agency.

Lee becomes the second major filmmaker to land at Endeavor in recent weeks, after the agency added David Cronenberg to the fold.

Lee’s move comes after the release of “Miracle at St. Anna,” an adaptation of the James McBride novel that was financed offshore and released in the U.S. by Disney. It has grossed less than $8 million domestically in four weekends.

The director informed Dave Wirtschafter that he’d be ending a relationship that spanned 17 years, beginning at ICM.

WMA sources said the agency was surprised and disappointed, but felt it did its job, helping Lee line up three potential jobs with “L.A. Riots” and “Inside Man 2” (both at Universal and Imagine) and “Time Traveler.”

Endeavor likely will try to help Lee re-establish himself as a comic director and give him more opportunities to make mainstream fare. He has been frustrated by the material offered him and by the struggle to get financing for his passion projects.

Lee had recently toiled to ramp up a biopic of singer James Brown, which Lee hoped to make with his “Jungle Fever” star Wesley Snipes in the title role. The film stalled because Lee felt he could not make the film at the $40 million budget offered by Universal. Lee also has struggled to mount the John Ridley-scripted “L.A. Riots” on a similar budget, but that is the frontrunner to be his next film.