Update (March 10, 4:52 p.m.): Matt Barkley has officially signed a two-year deal with the 49ers.
The 49ers reached a two-year contract agreement with quarterback Matt Barkley on Thursday night, a league source confirmed.
Barkley becomes the second quarterback the 49ers added on the first day of free agency. Earlier on Thursday, the 49ers agreed to terms on a two-year contract with Brian Hoyer. Barkley and Hoyer were teammates last season with the Chicago Bears.
The NFL Network was first to report the 49ers' agreement with Barkley.
Barkley, a three-year veteran, started six games for the Bears late in the season after season-ending injuries to Jay Cutler and Hoyer. His only victory came against the 49ers, 26-6, on an inclement day at Soldier Field. Barkley completed 11 of 18 passes for 192 yards with no touchdowns and no interceptions.
Last season, Barkley completed 129 of 216 pass attempts (59.7 percent) for 1,611 yards with eight touchdowns and 14 interceptions. His passer rating was 68.3.
Barkley entered the NFL in 2013 as a third-round pick of the Philadelphia Eagles under Chip Kelly. He appeared in just four games with the Eagles, completing 30 of 50 pass attempts for 300 yards with no touchdowns and four interceptions.
The 49ers entered free agency with no quarterbacks under contract after Colin Kaepernick opted out of his contract. There has been no reported interest in Kaepernick, who is an unrestricted free agent.