HOUSTON -- The Pirates added another arm on Wednesday, sending cash to the Padres in exchange for right-hander Sean Gallagher. Gallagher, manager John Russell confirmed, will step immediately into a middle relief role for the big league club.

Gallagher, 24, made 15 appearances for the Padres and allowed 14 earned runs on 24 hits in 23 1/3 innings before being designated for assignment on July 1. The righty struck out 21, walked 19 and allowed opponents to hit .276 off him.

Gallagher is scheduled to fly to Houston on Thursday, where he will join the Pirates some time before the team leaves for Milwaukee. The Pirates opened up a spot on the 25-man roster for Gallagher by optioning Daniel McCutchen to Triple-A after his start on Wednesday. McCutchen fell to 1-4 with an 8.58 ERA after allowing four runs over five innings in the Astros' 6-3 victory.

"I'm very grateful that the Pirates were able to give me the opportunity to come in there and really get a chance to show what I can do," Gallagher said, speaking over the phone from San Diego.

Given how dominant San Diego's bullpen has been this season, Gallagher was not one of the Padres' most prominently used relievers. He also missed most of May with a sprained left toe that he stubbed on a hotel door.

"I think it's more just being able to get some consistent work and being able to get back to the basics of just throwing," Gallagher said, when asked what has led to command problems this season. "I've been a little erratic at times this year. I think I can definitely get that problem solved and be a big help."

Of Gallagher's 60 career appearances, 23 have come as a starter. Russell didn't rule out using Gallagher in that role, or as a reliever in the back end of the bullpen, later this season if the need is there.

"I think the biggest thing is getting him in the 'pen and getting him right," Russell said. "It is just a matter of getting him on track."

Gallagher made his debut with the Cubs after being drafted by Chicago in the 12th round of the 2004 First-Year Player Draft. He also pitched for the A's before being traded to San Diego last July. Overall, Gallagher is 8-9 with a 5.57 ERA, 101 walks and 143 strikeouts in 173 Major League innings.

Gallagher is out of Minor League options, but if he is able to stick with the organization, the Pirates would have control of his rights through 2014.