OfficeMax Inc. and Office Depot Inc. are in advanced talks to merge, people familiar with the matter said, as the retailers of pens, paper and desks try to fight off tougher competition from rivals like Staples Inc. and Amazon.com Inc.

The deal is expected to be stock-for-stock, though precise terms couldn't be learned, including what percentage of a merged group shareholders of each company would own. The deal isn't done yet, and talks could still fall apart. But an announcement could come as early as this week, the people said.

An OfficeMax spokeswoman and Office Depot spokesman each said that their companies don't comment on rumors or speculation.

A deal would combine two companies that have been hammered in recent years by weak economic conditions, falling sales and rising online competition. Office Depot's market value is just $1.3 billion, and OfficeMax's is about $933 million.

Still, the two chains have a substantial retail presence. Office Depot, based in Boca Raton, Fla., has 1,675 stores world-wide, annual sales of some $11.5 billion and about 39,000 employees. OfficeMax, based in Naperville, Ill., has about 900 stores in the U.S. and Mexico, roughly $7 billion in annual sales and approximately 29,000 employees. OfficeMax is scheduled to post its quarterly and annual results Thursday.