Herbert Smith and Clifford Chance (CC) have lined up to advise on Essar Energy's exclusive agreement to buy Shell's Stanlow refinery in Cheshire for around $350m (£214.4m).

The agreement, which will see Shell leave the UK refinery market if it goes through, saw Essar agree to pay a break fee of $50m (£31m) if it backs out of the deal before the exclusivity period ends on 31 March.

Herbert Smith advised Essar, fielding a team led by M&A partners Alan Montgomery and Stephen Murray. The partners worked with Essar Global general counsel Raminder Singh and Essar Energy GC Sheena Singla.

CC advised Shell, with banking and finance partner John Wilkins leading a team also including real estate partners Michael Edwards and Nigel Howorth, antitrust partner Oliver Bretz, tax, pensions and employment partners Christopher Goodwill and Hywel Robinson, corporate partner Vanessa Marsland and senior associate Richard Tomlinson.

Montgomery said: "This is an important acquisition for Essar Energy. Stanlow is one of the largest refineries in the UK and will provide Essar with direct access into the UK market."

The transaction will be Essar Energy's first since it listed on the London Stock Exchange in May last year when it became the largest Indian company to float in London.

The total value of the deal is expected to be around $1.3bn (£798m), with Essar expected to make a separate payment after the deal completes for associated local marketing businesses in the UK and other associated businesses.