ROCKLIN, CALIF., AUG. 9 -- Joe Montana negotiated one of the richest -- and fastest -- contracts in NFL history with San Francisco 49ers owner Edward J. DeBartolo during lunch today and agreed to a four-year deal reportedly worth $13 million.

Montana, 34 and entering his 12th season, said he hopes the contract won't be his last with the 49ers. "I hope I make it four more to make another one," he said. "I'd like to. . . . I'm hoping that we have to do it again at the end of four years."

"So am I," DeBartolo said.

Montana, who led the 49ers to their fourth Super Bowl victory and second in a row last season, worked out the deal without an agent during a half-hour conversation with DeBartolo after morning practice.

DeBartolo said Montana wanted to keep the details of the contract private. "He's been an integral part of this franchise and the success we've achieved over the last decade," DeBartolo said. "I'm indebted to him."

Montana said he is "very happy with the contract and the terms."

He was in the last year of a three-year extension signed in 1988 that was to pay him $2.5 million this year. The new deal, according to a source close to the negotiations, reportedly would pay Montana $4 million this season, $3.5 million in 1991, $3 million in 1992 and $2.5 million in 1993.

The $3.25 million average per year puts him ahead of salary leaders Buffalo quarterback Jim Kelly ($3.14 million on average) and Philadelphia quarterback Randall Cunningham ($3.1 million).