The Diamondbacks agreed to terms with right-hander Rubby De La Rosa on a two-year minor league contract, a deal that will allow De La Rosa to spend next year rehabbing from his second Tommy John surgery while setting himself up to return to the big leagues in 2019.

“I think we’re both excited,” Assistant General Manager Jared Porter said. “He feels very comfortable with our medical staff and with working at Salt River Fields. This gives him a year to get healthy and then in 2019 to get back in the mix.”

De La Rosa underwent his second elbow surgery on Aug. 22. Porter didn’t rule out the potential for a September return, but he said the most likely outcome is that De La Rosa will miss next season before being in the mix for a bullpen spot in spring training in 2019.

The 2019 portion of the deal is similar to the minor league pact De La Rosa signed prior to this season. It includes a $750,000 base salary if he makes the majors and a chance to earn $2.75 million in incentives. It also includes an early-season opt-out.

Returning from a second Tommy John procedure is no sure thing; studies have shown just a 60-percent success rate for such surgeries. At his best, De La Rosa has a mid-to-upper 90s fastball along with a change-up and a slider.