The Padres got their man. The team and free agent first baseman Eric Hosmer have agreed to a deal, two sources said Saturday night. The average annual value of the eight-year deal is $18 million, the largest monetary commitment in Padres history. The Padres had said they would be creative. The $144 million contract is believed to be front-loaded, which might make the opt-out more attractive for Hosmer. The signing will push first baseman Wil Myers, whose six-year, $83 million deal signed in 2017 was the team’s biggest contract ever, to the outfield. Myers, who played with Hosmer briefly in Single-A while in the Royals’ system, has said he would be happy to move if it meant the Padres got Hosmer. The 28-year-old Hosmer hit .318 with a .385 on-base percentage in 2017, both career highs. He hit 25 home runs in 2017, for the second season in a row. Half the Padres projected starting lineup — Hosmer, Myers, Chase Headley and Freddy Galvis — is made up of veterans who have produced at a high level in recent years. This makes an already crowded outfield more competitive and adds protection for Myers in the lineup, something that has been lacking since Matt Kemp departed. The Padres coveted Hosmer for his ability to get on base and the leadership they believe he can provide their young team. Several people in the organization have said in recent days they believed his presence would make them a contender in the National League. However, this acquisition is also about the long term.