LOS ANGELES (AP) _ BankAmerica Corp. will absorb Security Pacific Corp. in a record merger, creating a West Coast banking superpower with a 10-state network, strong Asian operations and $190 billion in assets, the companies said Monday.

The $4.2 billion marriage, secretly negotiated for six months and agreed to Sunday, will create the nation's second-biggest bank, easily eclipsing two other bank megamergers announced in July.

It reflects the enormous pressure on U.S. banks to expand and cut costs to counter bad debts and competition from giant foreign banks. The companies said that by consolidating overlapping operations, they hope to save $1 billion in annual operating costs within three years.

''The economies of an in-market merger are overwhelming,'' Security Pacific Chairman and Chief Executive Robert H. Smith said at a news conference with his BankAmerica counterpart, Richard M. Rosenberg.

Rosenberg will serve as chairman and CEO of the merged company and Smith will be No. 2 as president and chief operating officer. The Security Pacific name will fade into history.

The officials refused to predict the impact of the merger on the banks' 92,000 workers and 2,400 branches, but said cuts would come from both companies.

The new company will maintain a headquarters in Los Angeles, the home of Security Pacific, but consolidate its corporate staff in San Francisco, where BankAmerica is based.

''We intend to build on the strengths of both institutions to create a highly profitable new banking enterprise that will become pre-eminent in the United States and even better positioned on a global basis,'' Rosenberg said.

BankAmerica is already one of the strongest U.S. banks, having survived a wave of troubles brought on by lending to developing countries during the mid- 1980s.

Security Pacific, on the other hand, is struggling with a troubled loan portfolio. It set aside $409 million for loan losses in its latest quarter, $249 million higher than a year before.

Investors welcomed news of the combination, bidding Security Pacific stock up $9.62 1/2 , or 42 percent, to $32.62 1/2 , and BankAmerica up $2.62 , or 7 percent, to $40.

Other bank stocks also rallied amid rising expectations of further consolidation in the industry. Los Angeles-based First Interstate Corp., one of the most frequently mentioned merger candidates among West Coast banks, rose $5.75 to $33.50. Wells Fargo & Co. of San Francisco was up $3.25 to $75.50.

Security Pacific had discussed merging with Wells Fargo, but broke off talks last winter. Smith wouldn't comment directly on why that combination hadn't worked out.

But he and Rosenberg both said they enjoyed each others' personal styles, noting that they both ran ''collegial'' operations - an indirect reference to the contrasting management style of Carl E. Reichardt, Wells Fargo's hard- nosed chairman and chief executive.

Smith also praised the ''strategic fit between the two organizations.''

''There are very strong and very similar operations in the Western states,'' he said. ''We have strong and similar operations in the Pacific Rim countries and our national and international strategies are remarkably similar.''

The wave of mergers in banking comes against a background of upheaval in the industry, severely hurt by bad loans, the recession and an inability to compete effectively with other financial-service companies that are unfettered by Depression-era banking laws.

Many bankers now have concluded that their survival depends on finding merger partners, eliminating duplications in staff, services and branches.

Last month, Chemical Banking Corp. and Manufacturers Hanover Corp., with assets totaling $135 billion, agreed to combine their operations, as did NCNB Corp. and C&S-Sovran Corp. with assets totaling $118 billion.

Under the merger agreement, each share of Security Pacific common stock will be exchanged for 0.88 shares of BankAmerica. Based on BankAmerica's closing stock price Friday of $37.37 1/2 , the value of the deal is about $4.2 billion.

The new banking company will be second in size to New York-based Citicorp, which has assets of nearly $217 billion.

BankAmerica currently ranks as the nation's second-largest banking company, with assets of roughly $110 billion at the end of 1990. Security Pacific, ranked fifth, had about $84 billion in assets at the end of last year.

Last month, BankAmerica reported second-quarter earnings of $272 million, up 2 percent from $267 million for the same period a year earlier. Security Pacific earned $46.7 million, down sharply from $195.2 million.

Bank of America was founded in 1904 as the Bank of Italy, aimed at serving San Francisco's large Italian immigrant population. BankAmerica is the holding company for the Bank of America organization.

Security Pacific was founded in 1871 in Los Angeles as Farmers and Merchants Bank. It had several name changes over the years as the result of mergers and acquisitions.