SAN FRANCISCO -- The 49ers reached agreement Wednesday on a five-year contract with defensive lineman Ray McDonald, according to a person with knowledge of the negotiations.
The person spoke on condition of anonymity to The Associated Press because free-agent deals can't become official -- or be formally announced -- until Friday.
McDonald was high on 49ers general manager Trent Baalke's list of players to bring back for 2011 and beyond. He could become a starter at defensive end depending on how the roster shakes out. The 26-year-old has started just nine games in his first four NFL seasons, all in 2008.
McDonald recorded 19 tackles last season for San Francisco (6-10) and returned his lone interception 31 yards for his first career touchdown.
Quarterback Alex Smith is expected to sign a one-year deal that should be announced Friday. The 2005 No. 1 overall draft pick gathered his teammates together for workouts at "Camp Alex" during the lockout. Coach Jim Harbaugh has said Smith is the leading candidate to be his starter.
San Francisco signed rookies Bruce Miller and guard Daniel Kilgore to four-year deals Wednesday. Miller, a seventh-round pick out of Central Florida, played defensive end in college but worked out for teams as a fullback leading up to the draft.
The 49ers traded up to select Kilgore out of Appalachian State with the 163rd overall spot in the fifth round that had belonged to Green Bay.
Also Wednesday, veteran free-agent tackle Barry Sims was an early arrival at team headquarters. That could mean he is poised to re-sign as well. Sims has proven himself as a reliable backup.
Undrafted free-agent rookie Jeremiah Masoli is making the move to running back with the 49ers after playing quarterback at Oregon and Mississippi.
"I'm anxious to show my versatility," said Masoli, who grew up in San Francisco. "I really like coach (Jim) Harbaugh. We have a great relationship and we have some history in the Pac-10. I just thought it was a great fit for me."
Masoli passed for 2,039 yards and 14 touchdowns with 13 interceptions in his senior season at Ole Miss and also ran for 544 yards and six TDs.
The 49ers attended a local pro day in the Bay Area. Afterward, Harbaugh asked Masoli to stick around for some running back drills and to catch punts.
"That was a little hint to myself that maybe it might be San Francisco," Masoli said. "There's definitely the childhood dream, the glamour of that. But it also had a lot to do with coach Harbaugh and the coaching staff."
Copyright 2011 by The Associated Press