For the longest time last season, Randall Delgado thought he was pitching for the Chicago Cubs, not the Atlanta Braves.

That’s because his name was immersed in constant trade rumors involving the Cubs. The Braves badly wanted one of Chicago’s veteran starters and made it clear they were willing to sacrifice their young right-hander from Panama to do it.

“Yeah, they were trying to get Ryan Dempster,” Delgado, 23, said. “I heard my name in other rumors before, but this one was like big. It was on TV. It was on radio. It was everywhere.

“I was like, ‘Oh, my God. I feel like I’m more on that team than here.’ ”

Dempster ultimately was dealt to the Texas Rangers just minutes before the trading deadline. Delgado stayed put in Atlanta, where he made 17 starts and finished 4-9 with a 4.37 ERA.

But the rumor mill didn’t end. It continued this past winter and this time, his agent told him the Diamondbacks were interested. On Jan. 24, Delgado became part of a seven-player deal that sent Justin Upton to Atlanta.

Delgado came to the Diamondbacks along with Martin Prado and three minor leaguers.

“I was a little surprised,” he said, “but I knew they were wanting to make changes and after all those things with the Cubs, I guess it didn’t surprise me too much I was traded.”

Delgado has been a surprise, emerging as a very real candidate to nab the No. 5 job in Arizona’s starting rotation behind Ian Kennedy, left-hander Wade Miley, Trevor Cahill and Brandon McCarthy.

He helped his chances once again on Monday during the Diamondbacks’ 5-3 win over the Dodgers at Camelback Ranch, allowing two runs over five innings in his third consecutive strong start.

And he did on the very day the Diamondbacks optioned left-hander Tyler Skaggs to Triple-A Reno, which leaves Delgado and lefty Patrick Corbin as the two final candidates for the No. 5 spot.

Asked whether the Skaggs demotion played on his mind prior to taking the mound against the Dodgers, Delgado smiled and shook his head.

“Actually, I didn’t know,” he said. “I just saw on Twitter he wrote something. … I just try to keep the same mentality.”