O.J. Simpson struck gold in his hometown of San Francisco yesterday and did not have to run through an airport to get it.

The 49ers agreed to take over the final year of Simpson's three-year contract at a salary of $733,000 annually in exchange for five high draft hoices to the Buffalo Bills.

The Bills will receive from the 49ers their No. 1 draft choice in 1979; Nos. 2 and 3 for 1978, and Nos. 2 and 4 for 1980.

The 49ers are taking a chance on Simpson, who will be 31 on July 9 and who had knee surgery last year. He also was forced to leave the Bills' training camp last July after suffering blurred vision in his left eye from a blow to the head he suffered in 1976.

Simpson needs 2,129 yards to become the NFL's all-time leading rusher.

"Obviously, I'm ecstatic," Simpson said at a news conference. The San Francisco native added, "I was a 49er fan when I was a kid and I've never stopped being a 49er fan.

"I had some good years in Buffalo, but hopefully I can get here what I couldn't get there, and that is a championship.

As he walked in to the packed press conference Simpson clapped his hands and said, "Home at last, thank God almighty, I'm home at last."

Simpson said he hopes to be able to play at least a couple of more years and said he had regained his enthusiasm for the game.

Before the trade became final, Simpson took a physical to make sure the knee he injured last season was sound. He said he passed the test with no problems, adding all he has to do is strengthen the knee.

The trade was surprising for several reasons. Until sportscaster Bud Furillo of Losd Angeles reported Thursday that the deal was in the works, it was thought that Los Angeles or Oakland might try to negotiate for Simpson, who holds the NFL single-season rushing record of 2,003 yards.

The 49ers already have two of the best running backs in the National Football League, Delvin Williams and Wilbur Jackson, both 26 years old.

The 49ers' offensive line has been rated as one of the weaker ones in the league. At Buffalo, Simpson had one of the NFL's strongest offensive lines.

A running back usually is most productive seasons in his first five years. Simpson is coming up to his 10th season.

Before negotiating a new three-year contract with Buffalo beforethe start of the 1976 season, Simpson had asked the Bills to try work out a trade with the Los Angeles Rams. Simpson and his wife dislike Buffalo's climate and the running back wanted to be in California because he has so many outside commercial interests there, particularly in firms.

His return to the city where he attended high school (Galilo) and the City College of San Francisco before shifting to the University of Southern California is expected to stimulate 49er ticket sales.

Crowds slumped at Candlestick Park after former coach Dick Nolan took the 49ers to three straight NFC West titles. New owner Edward J. De-Bartole Jr. brought to the franchise the financial resources of a fortune his father built in the contruction of shopping centers.

DeBartolo hired Joe Thomas as general manager. Thomas fired coach Monte Clark before the 1977 season. The 49ers dropped from 8-6 under Clark in his only season to 5-9 under rookie Coach Ken Meyer, and Meyer was replaced by Pete McCulley, former Redskin and Baltimore Colt receivers coach.

Simpson's $733,000 salary was believed to have discouraged other clubs from seriously negotiating with the Bills for him. He had said he would finish out the one year on his contract with the Bills, but would prefer to end his career in California, with a team that had a reasonable chance at a championship.

Carroll Rosenbloom, owner of the Los Angeles Rams, said he was against making such a deal for Simpson for the same reason he thought the 49ers were wrong in making an earlier deal with the New England patriots for quarterback Jim Plunkett.

"We (The Rams) are firm believers in keeping draft choice," Rosenbloom explained. "That's the way you build and become successful."

The Patriots traded Plunkett to the 49ers for two No. 1 draft choices in 1976 and a No. 1 and a No. 12 for 1977 and quarterback Tom Owen and quickly become a championship contender.

Remainded that the Rams apparently seriously considered a deal with the Bills for Simpson before the 1976 season, Rosenbloom said, "That time, it could have been a trade for the advantage of both teams (because veteran players would have gone to Buffalo and not draft choices)."

"This time, it would not have been to our advantage . . . If O.J. had been a free agent this time, we would have taken a look at a deal.We told the Bills that at the league meeting last week in Palm Springs. I think Chuck Knox (the former Ram coach now at Buffalo) got the better of the deal. He must have learned something at Los Angeles (about the value of draft choices)."

Most teams did not bid seriously for Simpson because his salary has gone up "astronomically," as one owner put it. It is understood that Simpson would have accepted from $150,000 to $200,000 in annual salary from a California team in 1976 before the Bills persuaded him to stayin Buffalo by paying him $733,000.