Manny Machado and the Baltimore Orioles avoided arbitration after all.

The Orioles and Machado agreed to a $16-million contract for the 2018 season on Friday, a source told Mark Feinsand of MLB.com.

The reported contract apparently contains incentives based on Machado winning awards this season, Feinsand reports.

Machado's 2018 salary will come in slightly below the projections of MLB Trade Rumors, which predicted he'd earn $17.3 million.

Baltimore looked to be headed for a hearing with its star third baseman earlier Friday when it was reported the sides had failed to come to terms on a deal for the coming season. The sides even filed arbitration figures after the 1 p.m. ET deadline to do so passed, but reached agreement shortly thereafter when the team came back to Machado with one final offer, according to Feinsand.

Machado, who will become a free agent at season's end, is coming off the worst campaign of his six-year career, having slashed .259/.310/.471 with 33 homers, 33 doubles, and 95 RBIs in 2017. The 25-year-old's name has been bandied about in trade rumors throughout the winter, and it remains unclear whether the Orioles will play him at third base or shortstop.

Related: Will Machado's plans to play shortstop create chaos in Baltimore?

The Arizona Diamondbacks were reported earlier this week to be the most persistent team in pursuit of Machado.