HENDERSON, Nev. -- The Las Vegas Raiders have agreed to terms with veteran quarterback Gardner Minshew on a two-year, $25 million free agent contract with $15 million guaranteed to compete with second-year quarterback Aidan O'Connell, a source confirmed to ESPN.

The addition of Minshew seemingly drops the Raiders out of discussions to acquire quarterback Justin Fields from the Chicago Bears, but not out of the running to trade up from No. 13 in the draft to select one of the top quarterback prospects. While coach Antonio Pierce has been upfront about wanting a franchise QB -- "You don't want to put a Band-Aid on the position," Pierce said at the NFL scouting combine -- he has been linked to LSU's Jayden Daniels, whom he recruited initially to Arizona State.

Editor's Picks

Some sore feelings may also have to be ironed out between Minshew and Raiders Pro Bowl edge rusher Maxx Crosby, who called the QB a "little-ass boy" in a New Year's Eve game at the Indianapolis Colts after Minshew did not take Crosby's hand to help him up after a play, Crosby said.

Minshew parlayed a one-year deal worth less than $3 million into a strong season for Indianapolis, starting 13 games in place of injured starter Anthony Richardson and throwing for 15 touchdowns and a career-high 3,305 yards.

His performance helped the Colts make a late playoff push, which ultimately fell short, and allowed him to cash in on an additional $2 million in incentives for playing 60% of the team's offensive snaps.

NFL Offseason: What You Need To Know

Tracking deals, cuts, trades | Key datesRanking top 100 free agents (ESPN+)Grading the biggest moves (ESPN+)Every coach hiring | Franchise tagsNFL draft order | Top draft prospects

Minshew, 27, also became a Pro Bowler for the first time, standing in as an alternate for the AFC.

The credibility Minshew provided as a backup was a key ingredient for the Colts, who rallied around him and improved by five wins over the previous season. Minshew's intelligence, according to coach Shane Steichen, was critical to his success as it enabled him to make good pre-snap decisions that increased the chances of successful plays.

Minshew's next step was always uncertain, but it was no secret that he was looking for an opportunity with more potential for playing time. He lost a position battle last summer, and Richardson, the No. 4 overall pick in the 2023 draft, is expected to reclaim his starting job this fall after shoulder surgery.

Minshew has started 37 games in his five seasons, including 20 starts with the Jacksonville Jaguars over the 2019-2020 seasons, and has thrown for 9,937 yards with 59 touchdowns and 24 interceptions.

The news of Minshew's agreement was first reported by NFL Network.

ESPN's Stephen Holder contributed to this report.