WASHINGTON (AP) _ The Justice Department today approved the sale of the San Francisco Chronicle to The Hearst Corp., the owner of its century-long rival, after Hearst agreed to sell its flagship San Francisco Examiner to owners of a local free-distribution newspaper.

The deal gives Hearst control of the city's dominant newspaper and ends a joint operating agreement in which the two papers have split profits evenly for the past 35 years.

Both newspaper deals were to close Friday. After a transition of four months, the papers will operate independently.

``For the first time in 35 years, San Francisco will have two independent daily papers,'' said Joel Klein, assistant attorney general in charge of the Justice Department's antitrust division. ``Consumers, such as advertisers and readers, will obtain the benefits of full competition between two daily morning papers.''

The Justice Department had been investigating the Chronicle sale because of concerns the Examiner might not survive without the joint operating agreement.