Free agent outfielder Nick Castellanos signed a $64 million, four-year deal Monday with the Reds, Cincinnati's latest big-money move to emerge from years of losing.

The deal allows Castellanos to opt out and become a free agent after the 2020 or 2021 seasons. He gets salaries of $16 million in 2020, $14 million in 2021, and $16 million in 2022 and 2023. There's a mutual option for 2024 at $20 million with a buyout of $2 million.

It was the fourth significant move by the Reds, among the most active teams in free agency since their sixth consecutive losing season.

“This is an off-season where we have prioritized adding to the offensive side of the club,” said Dick Williams, president of baseball operations. “Nick was one of the most attractive options on the market. He has been a consistently elite producer offensively and that complements our existing team well.”

The Reds have has committed $164 million to new players, including the two biggest free agent deals in club history.

Cincinnati signed second baseman Mike Moustakas to a $64 million, four-year contract and added left-handed starter Wade Miley on a $15 million, two-year deal. Outfielder Shogo Akiyama, an All-Star in his native Japan, got a $21 million, three-year deal.

Castellanos' deal raised the offseason total of contracts negotiated by agent Scott Boras and his staff to just over $1.2 billion.

Cincinnati's biggest weakness last season was offense. The Reds finished near the bottom of the National League in runs despite playing in one of its most hitter-friendly ballparks.

Castellanos batted .289 last season with the Tigers and Cubs, who got him in a midseason trade. He hit 27 homers overall, drove in 73 runs and had a major league-leading 58 doubles while playing mostly in right field for Detroit and Chicago.

Castellanos became only the 10th player with 58 doubles in a season. He has 229 doubles since the start of the 2014 season, tied with Boston's Mookie Betts for most in the majors over that span.

He joins a crowded outfield that will get sorted out in spring training.

Akiyama was a five-time All-Star center fielder with the Seibu Lions but could move to a corner spot. The Reds already have center fielder Nick Senzel, who is recovering from shoulder surgery.

Aristides Aquino took over in right field last season after Yasiel Puig was traded to Cleveland and had a sensational debut, but he slumped as the season closed out. The Reds also have Jesse Winker and Phillip Ervin.

Boras' deals for nine players eligible for free agency totaled $1,082,500,000, which included contracts for pitchers Gerrit Cole ($324 million), Stephen Strasburg ($245 million), Hyun-Jin Ryu ($80 million), Dallas Keuchel ($55.5 million) and Tony Watson ($3 million); third baseman Anthony Rendon ($245 million); Moustakas ($64 million); and catcher Matt Wieters ($2 million).

In addition, agreements for 19 arbitration-eligible players totaled $117.75 million. That group included Kris Bryant ($18.6 million), James Paxton ($12.5 million), Cody Bellinger ($11.5 million) and Jackie Bradley Jr. ($11 million).