Gemstar International Group Ltd., maker of electronic guides for television, and TV Guide Inc. agreed today to a $9.2 billion merger that positions the former rivals for growth in new forms of electronic advertising and commerce.

The deal ends six years of legal wrangling between the companies over technology patents for program guides, which offer daily schedules, commercials, and highlights of specials or pay-per-view movies on cable and satellite TV.

Moreover, it puts two of the emerging industry's titans together as new broadband digital technologies enter households with the ability to spur two-way communication over TV sets.

Many industry experts see a day not too far off when TV viewers will use a remote control to download product information via a television and purchase products through direct links to a manufacturer.

The program guides would be a tool through which to navigate numerous channels, commercials and electronic commerce sites in this future world of digital TV, much as a browser or "portal" site helps computer users surf the Internet.

"The interactive guide becomes the pivotal point for a consumer who sits down in front of their TV," said TV Guide President Pete Boylan. "We think it's a win-win deal enabling us to get on with what we think is a great opportunity."

The deal, creating TV Guide International Inc, has the support of each company's principal stockholders, including cable company Liberty Media Group and media baron Rupert Murdoch's News Corp., which each own 44 percent of TV Guide.

TV Guide International gains the strong brand name behind TV Guide and its magazine, which is read by about 34 million people weekly. TV Guide also operates the TV Guide channel on cable systems reaching about 50 million U.S. households, as well as various online, cable and other guides.

TV Guide shareholders will own 45 percent of the merged company's stock, and Henry Yuen, chief executive of Gemstar, will serve as its chairman and chief executive, the companies said in a joint statement.

Gemstar's program guide is used by satellite and cable TV systems, and its VCR Plus programming tool gives TV watchers the ability to tape shows using viewer codes that are published in more than 1,800 newspapers and program guides around the world.

Under the merger plan, TV Guide shareholders will receive 0.6573 shares of Gemstar common stock for each share of TV Guide Class A and B common stock they own. The stock portion of the deal is valued at $8.6 billion, and the new company will assume an additional $600 million in debt.