City National Bank, based in Los Angeles and with seven offices in San Diego, said it signed a definitive agreement to be acquired by Royal Bank of Canada in a stock and cash deal valued at $5.4 billion.

RBC is buying City National Corp., the holding company for the bank, for $2.7 billion in cash and 44 million of RBC common shares. The combined value at the Jan. 22 announcement was $93.80, or 26 percent above City National’s prior day’s closing price.

City National, long known as the banker to Hollywood stars, held about $32.6 billion in assets and operates 75 branches in five states. RBC held about $673 billion in assets, and about 1,200 branches in 18 countries including the United States.

The transaction is the largest for the banking industry in the last 3 ½ years, according to Dealogic. The biggest in Southern California was CIT Group’s pending acquisition of OneWest Bank for $3.4 billion, which is expected to close in the first half of this year.