New England Patriots quarterbacks Brian Hoyer (2) and Jarrett Stidham (4) warm up along with and tight end Andrew Beck (86) at NFL football practice in Foxborough, Massachusetts, Aug. 19, 2019. Credit: Elise Amendola | AP

INDIANAPOLIS — Brian Hoyer is getting another chance to extend his NFL career.

Just two days after being released by the New England Patriots, the Indianapolis Colts have signed the 33-year-old longtime backup to be their No. 2 quarterback a person with knowledge of the deal told The Associated Press.

The person spoke on condition of anonymity Monday because the Colts had not yet made an announcement. ESPN reported it was a three-year deal worth $12 million.

Hoyer takes over the No. 2 spot from Jacoby Brissett, who became the starter when Andrew Luck abruptly retired Aug. 24.

The only other quarterbacks on the roster are Phillip Walker, who is on the practice squad, and Chad Kelly, who will miss the first two games while serving a league suspension.

“We’re working through it. We want to get the right guy for us and we know there are some possibilities out there,” Colts general manager Chris Ballard said Sunday. “But we’re working through it and we’ll have him in the building here soon.”

Brissett, a third-round pick in 2016, also spent one season in New England before Indy acquired him in a trade on cutdown weekend in 2017 but the two ex-Pats never were teammates.

Hoyer originally made New England’s roster as an undrafted rookie out of Michigan State in 2009.

In his first three seasons with the Patriots behind Tom Brady, he played in 13 games but never started. In 2012, the Pittsburgh Steelers signed Hoyer after their top two quarterbacks got hurt and he finished the season with Arizona, which claimed Hoyer off waivers in December.

Hoyer got his most extensive experience with Cleveland in 2013 and 2014, where he went 10-6 as the starter. The next two seasons, in Houston and Chicago, Hoyer was 5-4 and 1-4 as the starter before going 0-6 with San Francisco in 2017. The 49ers released Hoyer after acquiring Jimmy Garoppolo in a trade with New England.

That opened the door for Hoyer’s return to New England, where he spent the rest of the 2017 season and all of last season.

The Patriots released Hoyer on Saturday, allowing the Colts to bring him to town Sunday and sign him Monday. Indy opens the season Sunday at the Los Angeles Chargers.

Hoyer has completed 838 of 1,412 passes with 9,902 yards, 48 touchdowns and 30 interceptions in 10 NFL seasons.