Free-agent NFL quarterback Brian Hoyer is signing a three-year deal with the New England Patriots after visiting with the team on Wednesday morning, according to Tom Pelissero of NFL Network. Field Yates of ESPN first reported Hoyer’s visit to the defending champs.

The news comes just days after the Patriots traded well-known backup quarterback Jimmy Garoppolo to the San Francisco 49ers for a second-round draft pick.

Hoyer, who played for the 49ers this season, was originally supposed to be included in the deal for Garoppolo, but the Patriots did not want him as part of the trade due to compensatory draft pick reasons.

San Francisco, which now has Garoppolo and rookie signal-caller C.J. Beathard in tow, released Hoyer right after the deal was completed.

In six starts for the 49ers this year, the 32-year-old Hoyer threw for 1,245 yards, four touchdowns and four interceptions while completing 58 percent of his passes and registering a passer rating of 74.1.

The North Olmsted, Oh. native played his college football at Michigan State University and went undrafted in 2009. However, he was signed by the Patriots, where he lasted three seasons and threw 43 passes.