Amazon Studios has bought North American rights — including theatrical and streaming — to Woody Allen’s untitled feature film.

The film, shot last summer on location in New York and Los Angeles, is a romantic comedy set in the ’30s and stars Jeannie Berlin, Steve Carell, Jesse Eisenberg, Blake Lively, Parker Posey, Kristen Stewart, Corey Stoll and Ken Stott.

Amazon will open the film this summer with a traditional nationwide theatrical release. Following its theatrical run, it will become available exclusively to Prime members through Prime Video.

“Like all beginning relationships, there is much hope, mutual affection and genuine goodwill — the lawsuits come later,” said Allen.

“Woody Allen is a brilliant filmmaker,” said Roy Price, head of Amazon Studios. “We’re so proud to be in business with him for both his next film and his first-ever TV series.”

Allen is writing and directing an untitled six-episode television series for Amazon starring himself, Elaine May and Miley Cyrus. It is exec produced by Erika Aronson, produced by Helen Robin, and begins shooting next month.

Producers of the new film include Allen’s longtime collaborator and sister Letty Aronson, as well as Steve Tenenbaum and Edward Walson. Executive producers are Ronald L. Chez, Adam B. Stern, and Marc I. Stern.

Allen’s “Irrational Man” starred Joaquin Phoenix and was a disappointment at the box office last year with only $4 million in domestic grosses for Sony Classics, which has handled Allen’s titles dating back to 2009’s “Whatever Works.” Allen’s “Midnight in Paris” became his most successful film in 2011 with over $160 million in worldwide grosses and 2013’s “Blue Jasmine” also performed well with over $100 million worldwide.

The deal was negotiated by ICM Partners, Erika Aronson of Taborlake and Loeb & Loeb on behalf of the filmmakers.