Kris Medlen will continue trying to make it back to the major leagues this spring, but not with the Braves.

The popular former Braves pitcher, who returned to the team on a minor league contract last year, signed with the Diamondbacks for 2018. He got a minor league deal, but unlike the contract he signed with the Braves in late-January 2017, this one with the Diamondbacks includes an invitation to major league spring training.

Medlen, 32, will make $1.1 million if he makes Arizona’s major league roster, and he has an opt-out clause that will allow him to sign with another team if he isn’t on the 40-man roster by March 27 at the end of spring training.

He hoped to return to the Braves in 2018 after buying a home for his family in the city of Atlanta, but hadn’t heard interest from new Braves management this offseason.

Medlen came back from shoulder problems with the Royals in 2016, spent last offseason and spring training rehabbing his shoulder and working on a less-stressful pitching delivery, then 5-8 with a 4.95 ERA in 20 starts last season at three minor league levels in the Braves organization after beginning his season in late May.

He had 98 strikeouts with 30 walks in 116 1/3 innings.

“I’m just in a completely different spot than last year,” said Medlen, who came back from two Tommy John elbow surgeries with the Braves to have a promising season with Kansas City in 2015, then considered retiring after shoulder woes twice landed him on the Royals disabled list in 2016.

“I had just started working out at this time last year. Been working my tail off to get back and gained a lot of confidence the way I finished up last season in Gwinnett,” Medlen said. “I am more than ready for an opportunity with a good young team in Arizona.”

He decided against retiring after consulting with a biomechanics specialist in New Orleans who showed he could adjust his delivery to lessen the risk of injury. The Braves signed Medlen and told him not to rush things, to work at a pace that would best put him in position for a possible second-half return to the majors.

After two starts in high Single-A in May, Medlen made two at Double-A Mississippi, where he had a 1.74 ERA and seemed to be inching closer to a potential call-up with the Braves.

But after a promotion to Triple-A Gwinnett, Medlen ended up spending the rest of the season there, going 3-7 with a 5.42 ERA in 16 starts. The Braves had several young prospects they wanted to gain experience at the big-league level late in the season, and those pitchers filled out the rotation in the final weeks of the season.

Former general manager John Coppolella indicated an interest in bringing Medlen back for 2018, but Coppolella was forced to resign after the season amid a Major League Baseball investigation that led to serious penalties for the Braves and a lifetime ban from baseball for Coppolella.

Medlen, an affable southern California native, debuted in the majors with Atlanta in 2009 and went 41-25 with a 3.25 ERA in 173 games (75 starts) over parts of five seasons through 2013. He was a sensation for the Braves in 2012, going 10-1 with a 1.57 ERA in 50 games including 9-0 with a puny 0.97 ERA in 12 starts after a midseason move to the rotation.

He had his second Tommy John elbow surgery with the Braves during spring training 2014, missed that entire season and then left as a free agent, signing a two-year, $8.5 million deal with Kansas City – an indication of how highly thought of Medlen was by Royals general manager Dayton Moore, a former Braves assistant GM.