The holdup in the A’s-Yankees talks involving Sonny Gray was James Kaprielian.

Oakland and New York agreed with little rancor on Jorge Mateo and Dustin Fowler, both filling the A’s desire — if possible — to add athletic players who could ultimately play center field.

But for the third player the A’s wanted Kaprielian. The Yankees offered permutations that would have given Oakland two other pitchers, but ultimately — on July 31, deadline day — the Yankees relented.

The big reason they did so — beyond the obvious of really wanting Gray — was the timeline for Kaprielian being a full-workload pitcher even without further injury disruption.

Kaprielian had Tommy John surgery last April 13, which with a conservative course likely puts him back into competition around June 2018. Perhaps he throws 75 innings next year and 125 in 2019 and then about 2020 he would be in line to reach 160-plus innings. He is repped by Scott Boras and the powerful agent has become more dogged than ever on having his clients — especially those coming off of elbow surgery — build innings on a slow, steady progression.

Also, keep in mind that after next season, a team (the A’s now) will have to consider protecting Kaprielian on the 40-man roster or risk losing him in the Rule 5 draft.

The Yankees loved Kaprielian and had visions of him before injuries in both 2016 and ’17 joining the big league team for a playoff chase. But he stands at 29 total innings three years into his professional career and the fact that he is seasons (plural) away from consideration to work a full-time starter’s load moved the Yankees to heed to the A’s wishes and include him in a deal for Gray, who is under Yankees control through 2019.