SAN DIEGO -- Looking to land a starting pitcher to help their rotation this season and beyond, the Padres traded for D-backs right-hander Ian Kennedy on Wednesday, hours before the non-waiver Trade Deadline.

The move surprised more than a few in the Padres' clubhouse.

"It was a little surprising," said catcher Nick Hundley. "But at the same time, it's very exciting because you know our starting staff just got better."

The Padres dealt left-handed reliever Joe Thatcher, Minor League right-hander Matt Stites and a 2014 Competitive Balance Round B Draft pick to the D-backs for the 28-year-old Kennedy, who was fourth in the National League Cy Young Award vote in 2011.

"He's a first-round pick, a pedigree guy, in Arizona he won a lot of games and pitched a lot of innings. I got to know him well as a person there," said Padres general manager Josh Byrnes, who had Kennedy when both were previously with the D-backs.

"He's a very legitimate starting pitcher … something we need to take another step forward. We're excited to have him."

Kennedy will make his Padres debut Sunday against the Yankees at Petco Park.

Kennedy, who won't turn 29 until Dec. 19, is 3-8 with a 5.23 ERA in 21 starts this season. He allowed three runs in five innings in a 5-2 loss Tuesday against the Rays.

"I don't think this guy is a project … he's a finished product who might need a tweak," said Padres manager Bud Black.

This season has been a struggle at times for Kennedy, though Byrnes is hopeful he can get well at pitcher-friendly Petco Park, and by working with Black and pitching coach Darren Balsley.

"We gave up things we value to get Ian Kennedy. But in order to get the kind of starting pitcher who can do what Ian can do, we felt like this was the right value for us," Byrnes said.

Kennedy is making $4.265 million this year and is under club control through 2015. He'll likely make $6 million.

Kennedy has strong ties to Byrnes and assistant general manager A.J. Hinch. It was Byrnes who obtained Kennedy for Arizona from the Yankees in a three-team deal in December 2009. Kennedy played for Hinch, who was manager of the D-backs for parts of '09 and '10.

"I don't think it's hit me yet," Kennedy told reporters Wednesday in St. Petersburg, where the D-backs are playing. "Part of me is excited for going back to California and playing in San Diego. But I know that this team was special here. It's kind of weird, I don't think it's set in yet."

This is not only the second time Byrnes has obtained Kennedy in a trade, but the second time D-backs general manager Kevin Towers traded for Thatcher -- the first coming in 2007.

"As I told [Kennedy] as a first-year GM, he was an integral part of us winning the division in 2011, and for a new GM in a new market, what he did, from a selfish standpoint, gave me some credibility within this division and with this new ballclub and market," Towers said.

"No negatives on Ian. Not having his best of years, but that's baseball, that happens. This guy won 38 games over the last couple years, did some great things for this organization."

Thatcher, 31, was 3-1 with a 2.10 ERA in 50 games this season as a left-handed specialist for the Padres. In parts of seven seasons with San Diego, he's 8-11 with a 3.18 ERA. Left-handed batters are hitting .215 against him this season and .209 in 344 career at-bats.

"It's obviously bittersweet. I had an unbelievable run here in San Diego. The seven best years of my life have been here. It's an unbelievable organization," Thatcher said.

Stites, 22, had emergency appendectomy surgery this week, which ended what was a productive season with Double-A San Antonio. He was actually refilling his prescription Wednesday when he was told the news of the deal.

Stites, who skipped over Class A Lake Elsinore, was 2-2 with a 2.08 ERA and 14 saves in 46 games, recording 51 strikeouts to only eight walks in 52 innings.

As for Kennedy, the Padres feel they landed an arm to anchor their transient rotation for the immediate future and beyond, and they're banking on him regaining his 2011 form when he went 21-4 with a 2.88 ERA in 33 starts.

"It's huge. I think coming over here to Petco, getting out of Arizona, with his fly-ball ratio, is going to be good for him and us," Hundley said. "He's a proven Opening Day starter. You don't expect to be catching a guy like that because he's in the same division."

Byrnes said he had conversations with Towers for the past week about a deal. The Padres have been watching Kennedy's starts of late, too.

"He's had a down year for him," Byrnes said. "We scouted him a lot and watched him recently and tried to assess at age 28 why that is. We're hopeful he can come here and get back to performing like he can."

The Padres desperately needed some stability with their rotation -- both for this season and future ones.

The Padres entered Tuesday's 4-1 loss to the Reds with the second-highest ERA (4.66) among NL starting pitchers, ahead of only the Brewers (4.70).

With Jason Marquis and Clayton Richard out for the season with injuries and it looking very unlikely that Tuesday's starter, Edinson Volquez, will return, the Padres had three starters to build their 2014 rotation around -- Eric Stults, Tyson Ross and Andrew Cashner.