Davis Polk & Wardwell, extending its decadeslong relationship with Morgan Stanley, is advising the bank on the biggest U.S. bank buyout since the 2008 debt debacle: a $13 billion acquisition of discount broker E*Trade.

The all-stock transaction, announced Thursday after The Wall Street Journal first reported the deal, will see Morgan Stanley take on an additional 5 million customers and $360 billion in assets.