The Baltimore Orioles have agreed to a seven-year, $161 million deal to keep free-agent first baseman Chris Davis.

Davis reportedly had been weighing a seven-year deal worth more than $150 million from the Orioles since early in spring training. That deal reportedly had been on and off the table as the Orioles considered other options.

In fact, it was reported Thursday that the Orioles had made a sizeable offer to free-agent outfielder Yoenis Cespedes.

But in the end, Davis will remain with Baltimore, where he has spent the past five seasons.

Davis led the majors with 47 homers and 208 strikeouts last season, when he hit .262/.361/.562 with 117 RBI. Since the 2012 season, Davis leads the majors with 159 homers and 749 strikeouts.

As for Cespedes, it remains to be seen whether the Orioles remain interested in him or whether the deal for Davis ends that pursuit.