In “The Trial of the Chicago 7,” Sacha Baron Cohen set aside his bag of improv tricks to portray “Flower Power” activist Abbie Hoffman. The drama, written and directed by Aaron Sorkin, unravels almost like a play, following the real-life story of the seven defendants charged with federal offenses for supposedly inciting protests at the 1968 Democratic National Convention. (If only Sorkin knew how timely his movie would be in 2021 when he first wrote the screenplay in 2007.)

“I’d be lying if I wouldn’t say I wasn’t nervous to work with Aaron, because he’s the greatest living screenwriter,” Baron Cohen tells Ben Affleck in Variety’s Actors on Actors, presented by Amazon Studios. “He’s the Shakespeare of our time. Although you have won an Academy Award for writing.”

“Oh, that’s right!” quips Affleck, who won the best screenplay Oscar for “Good Will Hunting” in 1998. (Affleck is featured in our issue for his performance as an alcoholic basketball coach in “The Way Back.”)

Baron Cohen is best-known at the movies for playing the gonzo Kazakh TV journalist Borat, the star of a box-office blockbuster 2006 film “Borat” and its recent sequel that came out before the 2020 election. But he’s also pulled off character roles, such as the rival barber Adolfo Pirelli in Tim Burton’s 2007 film adaptation of “Sweeney Todd.”

Working with Sorkin, Baron Cohen knew about the writer-director’s tendency to keeping the dialogue in a scene exactly how it’s written on the page. “I’d heard his reputation, and I did wonder, ‘Why are you casting me, well-known improviser, to deliver special lines?’” Baron Cohen says. “And I spent probably about two months pitching him alternative lines, because I read everything that Abbie Hoffman had written. Aaron was nice enough to humor me. Each time he’d say, ‘Thank you, but no.’”

Still, he says found the experience “quite liberating” in a different way. “I thought, ‘OK, I’m just going to concentrate on different variations of that particular line,’” Baron Cohen says. “Because it was a low-budget movie, they were in a rush to make it. I thought, ‘I’d better learn, I’d better make sure that the first take is perfect for him.’”

If the scene went as planned, Baron Cohen would ask Sorkin if he could attempt a variation of the line with his own spin on it. “Sometimes I’d have enough chutzpah to try that,” Baron Cohen says. “In the end, I spoke to the editor and he was like,’ I saw in the dailies you were really pushing Aaron.’”

For more from Variety’s conversation with Affleck and Baron Cohen, click here, and watch the full conversation below.