After just one season in Chicago, quarterback Brian Hoyer is set to join Kyle Shanahan and the San Francisco 49ers, according to Ian Rapoport of NFL Network. It is expected to be a multi-year deal, but it’s unlikely that it keeps the 49ers from continuing to pursue upgrades at the quarterback position.

With Colin Kaepernick opting out of his deal with the team, all four quarterbacks under contract with the 49ers were set to reach free agency Thursday, but now the team will have at least one player under contract for the immediate time being.

The 49ers have been linked to Washington’s Kirk Cousins, who would may be available via an expensive trade, and the team also owns the No. 2 pick in the 2017 NFL Draft.

Heading into his ninth season in the league, Hoyer is a solid backup quarterback with enough left in the tank to be successful as a starter. He also has a willingness to mentor young quarterbacks, and that’s likely the role he’ll fill in San Francisco.

Joining the 49ers will be a reunion for Hoyer, who previously played under Shanahan in Cleveland. However, it was arguably the worst stretch of his career as he finished his two seasons with the team with 17 touchdowns, 16 interceptions, and a less-than-stellar 77.6 passer rating.

When asked to step in as the Bears’ starter in 2016 after Jay Cutler was sidelined, Hoyer played much better and completed 134 passes for 1,445 yards and six touchdowns without throwing an interception. He only had the opportunity to play in six games (five starts) before breaking his arm against Green Bay in Week 7.

Hoyer signed his one-year deal with the Bears ahead of the 2016 season, worth $2 million, following a one-year stint with the Texans. Houston initially signed the quarterback to a multi-year contract, but mortgaged the team’s future on Brock Osweiler from Denver and released Hoyer shortly thereafter.

Before landing in Houston, Hoyer spent two seasons with the Browns, one season with the Arizona Cardinals, and his first three years in the league with the New England Patriots after going undrafted out of Michigan State. It wasn’t until 2014 with the Browns that the quarterback played in more than five games in one season.