The Padres on Wednesday morning made a trade that could help in both areas as they acquired 28-year-old, right-handed starting pitcher Ian Kennedy from the Arizona Diamondbacks before seeing their four-game winning streak end in a 4-1 loss to the Reds at Petco Park.

“This helps us immediately as well as moving forward,” Padres manager Bud Black said of the three-for-one trade that cost the Padres left-handed reliever Joe Thatcher, right-handed minor league reliever Matt Stites and a Compensation Round B draft pick.

“Ian fits right into our starting rotation.”

Kennedy, who is scheduled to make his Padres debut Sunday at Petco Park against the New York Yankees, was 3-8 for the Diamondbacks this season with a 5.23 earned run average in 21 starts.

But he has a career record of 49-38 with a 3.99 ERA in 133 games (131 starts) and was the Diamondbacks’ Opening Day starter each of the past three seasons.

And in 2011, Kennedy finished fourth in the National League Cy Young Award voting after going 21-4 with a 2.88 ERA over 222 innings. His 39 wins since the start of the 2011 season is the fourth most in the National League.

“He’s had a down year for him, but we think Kennedy can get back to performing at the level he has in the past,” said Padres General Manager Josh Byrnes, who has now twice traded for Kennedy.

Byrnes was the general manager of the Diamondbacks on Dec. 8, 2009, when Arizona acquired Kennedy from the Yankees as part of a three-way trade that included the Detroit Tigers. A native of Huntington Beach, Kennedy was the first-round draft pick of the Yankees (21st overall) in the 2006 draft out of the USC.

In addition to being brought to the Diamondbacks by Byrnes, Kennedy played for current Padres Assistant General Manager A.J. Hinch, who was manager of the Diamondbacks in 2009 and 2010.

Byrnes said he targeted Kennedy about two weeks ago, and the Padres extensively scouted Kennedy’s last three starts. But actual talks with Diamondbacks (and former Padres) General Manager Kevin Towers didn’t begin until the Padres were in Arizona last weekend.

“Over the last couple days, Kevin and I talked a lot about this,” said Byrnes, who said the deal was completed Wednesday morning only 90 minutes before the trade deadline passed at 1 p.m.

“We’re excited to add a starting pitcher of Ian’s pedigree,” said Byrnes. “He is under club control through 2015. We feel he will help us take another step forward as a team.”

Although Kennedy immediately bolsters the Padres rotation, Byrnes said his spot in future rotations was crucial in planning for the trade.

“Our starting pitching could get a lot better quickly,” said Byrnes.

Immediately, Kennedy joins a rotation that includes Andrew Cashner, Tyson Ross, Eric Stults and Edinson Volquez. Looking ahead, the Padres expect to have top prospects Cory Luebke, Joe Wieland and Casey Kelly back from “Tommy John” surgery next spring.