Capital Cities Communications Inc. announced today it has agreed to acquire American Broadcasting Companies Inc. for $3.5 billion, a transaction that will transfer ownership of a television network for the first time.

The deal has been unanimously approved by the boards of directors of both companies, but must be approved by stockholders and government regulators as well. Experts said today it could take a year or more to complete because the Federal Communications Commission will require the companies to sell overlapping radio and television properties before it clears the transaction. Details on Page D1.

In addition to its television and radio networks, ABC owns television stations in New York, Chicago, Detroit, Los Angeles and San Francisco. It also owns five AM and seven FM radio stations, a cable sports network (ESPN), and other publishing, broadcasting and cable operations.

Capital Cities owns seven television stations, including the ABC affiliates in Philadelphia, Houston, New Haven and Buffalo; six AM and six FM radio stations; cable television systems, and a group of daily and weekly newspapers, including The Kansas City Star/Times and the Fort Worth Star-Telegram. The company also publishes Institutional Investor, Fairchild Publications, and shopping guides.

ABC had revenue last year of $3.7 billion and earnings of $195 million, or $6.71 a share. Capital Cities had revenue of $949.7 million and earnings of $135.2 million, or $10.40 a share. Revenue and operating earnings at both companies were up about 20 percent above the prior year. The combined company will be called Capital Cities/ABC Inc.

While ABC is more than three times the size of Capital Cities in terms of revenue, the stock market value of each is roughly the same, $2.2 billion.

Analysts pointed out that the market value of ABC's stock was far below the value of its assets, but noted that the network has been running third in the ratings this year.

Capital Cities said it would pay $118 a share in cash plus at least $3 a share in warrants for ABC, making the deal worth at least $121 a share to ABC stockholders. A warrant would give ABC shareholders the right to buy Capital Cities stock at a set price within a given period of time. ABC stock rose 31 3/8 a share to 105 7/8 after the merger announcement, while Capital Cities stock rose 7 1/2 to 183 1/2.

The announcement ended months of Wall Street rumors about a bid for ABC, but increased speculation that someone might bid for the other two major networks. In very heavy trading on the New York Stock Exchange today, CBS Inc. stock was was up 6 points to 94 1/2 and RCA Corp., the parent of the NBC network, was up 2 3/8 to 40 3/8.

The networks, all of which also own profitable affiliated television stations, have been mentioned frequently in the financial press as potential takeover targets because the value of their assets is greater than the market value of their outstanding stock. Moreover, Fairness in Media, a conservative group supported by Sen. Jesse Helms (R-N.C.), said it wants to obtain control of CBS to end what it claims is a liberal bias in its news coverage.

Executives of ABC and of Capital Cities emphasized that their merger would not affect the network's news coverage.

Leonard H. Goldenson, 79-year-old chairman and chief executive officer of ABC, said in an interview that Thomas S. Murphy, chairman and chief executive officer of Capital Cities, first proposed the merger last December. Goldenson said he decided the combination is in the best interest of the companies and the public, and said the agreement ensures that the ABC news operation will continue to operate "as a whole."

Murphy emphasized that despite adding more than $3 billion in debt to Capital Cities' balance sheet, he would not slash the ABC news budget.

"You've got to remember we have been in the business almost as long as Goldenson ," Murphy said. "We just don't interfere in any way with our editorial people. You can't get good editorial people when you do that."

Goldenson said there were no other offers besides the Capital Cities bid that the ABC directors considered today.

"My understanding is that Leonard Goldenson specifically wanted to do business with Tom Murphy," said Warren Buffett, the chairman of Berkshire Hathaway Inc. "That Capital Cities is the company he Goldenson wanted to marry his daughter to. He cares enormously where it goes."

Capital Cities Chairman Murphy said he would finance the merger mainly through bank borrowings. The remainder will be financed with cash raised through the sale of certain assets and through $517.5 million in capital raised through the sale of 18 percent of Capital Cities to Berkshire Hathaway.

Berkshire Chairman Buffett will be elected a director of Capital Cities when the Capital Cities-ABC merger is completed. When he officially accepts the Capital Cities board seat, Buffett said, government regulations will force him to resign as a director of The Washington Post Co.

Wall Street sources said there is a possibility that someone could make a competing bid for ABC at a higher price. However, any new bidder for ABC presumably not only would have to raise the stakes, but also would need the blessing of Goldenson and ABC directors. They said a hostile bidder would have little chance of success because ABC could bleed an unwanted raider by dragging out negotiations and legal proceedings for years.

Goldenson indicated he and his board would consider a higher offer, although he clearly has picked his preferred suitor. "That's a problem we will have to face when and if it happens," Goldenson said when asked about the possibility of a higher bid.

Some analysts said today they believe ABC agreed to the merger to prevent a hostile takeover of the network. "I think it became clear we were sitting ducks for what could have been an unfriendly takeover," said a top executive of ABC.

Top managements of ABC will assume key positions in the merged company.

Goldenson will serve as chairman of the executive committee of the new company; Murphy will be chairman of the board and chief executive officer; Frederick S. Pierce, currently president of ABC, will continue to run ABC as chairman of ABC Inc. and as vice chairman of the board of the new company, while Daniel B. Burke, president of Capital Cities, will be president and chief operating officer of the new combined company.

Some Wall Street estimates put the value of ABC as high as $153 a share if it were broken up and sold in pieces. Goldenson said he believes the Capital Cities offer is "on the high side" and that he does not regard the Wall Street estimates of ABC's value as "what you work out a deal for."

"Breakups sometimes take a period of years," Goldenson said. "A breakup is not the true indication of the value of a going concern."

Under terms of the merger agreement, each share of ABC common stock will be converted into $118 in cash plus 1/10th of a warrant to purchase Capital Cities common stock.

Each whole warrant will give the holder the right to purchase one share of Capital Cities common stock at $250 a share for a period of two and a half years following completion of the merger. For a period of 90 days after the merger, warrant holders will have the right to sell those warrants to Capital Cities at $30 per warrant.

That comes out to at least $121 a share for ABC shareholders. ABC has 29.1 million shares of common stock outstanding.

If the merger is not completed by Jan. 6, 1986, the $118-a-share cash portion of the purchase price would be increased at the rate of 6 percent per year until June 30, 1986 (but reduced for ABC dividends paid) and at increasing rates thereafter.

Capital Cities also has purchased from ABC for $53 million an option to purchase 5.3 million shares of ABC common stock at $118 a share, with the option price to be applied toward the purchase price.

The merger is expected to be considered by stockholders of both companies at their annual meetings in June.