James Gandolfini is lined up to play legendary writer Ernest Hemingway as part of a new deal with HBO.

The Sopranos star will play the title role in Hemingway, which will follow the turbulent romance between the author and war correspondent Martha Gellhorn.

Gandolfini recently signed a three-year exclusive deal with the company, under which he will develop and produce new programmes.

HBO's chairman and CEO Chris Albrecht told Access Hollywood: "The Sopranos is a landmark in TV, and the gifted James Gandolfini is one of the reasons for the show's remarkable success. I'm delighted that he will continue to work with the network after the end of the series."