Ontario-based CVB Financial Corp. has agreed to buy Pasadena-based Community Bank for $878 million in cash and stock, the two bank institutions announced Monday.

CVB Financial, parent of Citizens Business Bank, has agreed to pay $178 million in cash and the equivalent of 30 million shares of CVBF common stock to Community Bank shareholders. Each share of Community Bank common stock would be purchased with 9.46 shares of CVBF common stock, giving Community Bank shareholders collectively a 21 percent stake in CVBF.

Christopher D. Myers, chief executive of CVB Financial, said in a statement, “We are excited to be merging with a successful business bank that has been built customer by customer for the past 74 years. Our combination with Community Bank provides us tremendous financial opportunity in terms of depth of talent, a strong and diverse customer base, and significant geographic overlap. We have truly admired this franchise for a long time. The reality of blending our two teams is very exciting.”

Citizens Business Bank has financial and commercial banking centers in Encino, Camarillo, Westlake Village, Burbank, Glendale, La Canada Flintridge and Lancaster. Community Bank has locations in the Valley region in Woodland Hills, Burbank, Glendale and Santa Clarita.

David Misch, chief executive of Community Bank, said in a statement, “We are delighted to be joining forces with an organization that so strongly complements and builds upon Community Bank’s long-standing tradition of customer, employee and community focus.”

Community Bank had approximately $3.7 billion in total assets as of Dec. 31.

CVB Financial Corp. is the ninth largest bank holding company headquartered in California with assets of $8.3 billion. Its main subsidiary, Citizens Business Bank, has 51 branches and three trust office locations.