The Baltimore Orioles jumped on Hanrahan for four runs in the fifth inning, then rolled to an 11-8 victory on Thursday night.
Hanrahan gave up five hits, including three for extra bases, and walked one.
"I was embarrassed for a little bit there," Hanrahan said. "You give up five hits in a row, it's not looking too good. I'm not overly concerned about it, but you've still got to get people out."
Hanrahan is working this spring on throwing inside more often, but on Thursday he was unable to command his fastball.
"I threw some good ones," Hanrahan said. "But I also threw a lot of bad ones. For the most part, the ball was up."
Hanrahan was named Pittsburgh's closer at the start of spring training. Over his first three outings, he had allowed one run on three hits.
The first six Orioles to face Hanrahan reached base to erase a three-run deficit. Ryan Adams' two-run home run to right field gave Baltimore a 5-4 lead.
"You try to work on things, but there comes a point when you've got to let the competitor take over and get some people out," Hanrahan said. "I didn't do that until too late."
Orioles right-hander Brad Bergesen, who'd hoped to work four innings, lasted only 2 2-3 innings. He gave up four runs on six hits, walked two and struck out one.
"I never like having an outing like that, but at the same time, it's early, I'm still working on things," Bergesen said. "Outings like this are unacceptable, but I'm not getting down on myself or turning into a mental head case by any means. I know what I need to work on."
Bergesen said he has to make just a small adjustment, keeping from getting rushed and allowing his shoulder to fly open.
"When I got into trouble, I didn't make pitches," Bergesen said. "Lesson learned."
Pirates starter Paul Maholm allowed one run on four hits and struck out one. It was the left-hander's sharpest and longest outing so far this spring.
"I was aggressive and got some ground balls for double-plays," Maholm said. "I threw two bad pitches. Both were supposed to bounce, but neither quite reached the dirt. That's just part of getting in sync with your slider."
Notes: The teams combined for 27 hits and six errors. ... Baltimore manager Buck Showalter said 2B Brian Roberts, who hasn't played since Monday due to back spasms, took batting and fielding practice, and may play Friday against Philadelphia. ... INF Cesar Izturis, who's been out with an injured left ankle, is ready to play. ... RHP Koji Uehara threw for the first time since he had a cortisone shot in his right elbow on March 4. ... Pirates LHP Scott Olsen will throw 35 pitches Friday in live batting practice at the minor league camp. Olsen has been out since Feb. 17 with a strained left hamstring. ... Pirates RHP Joe Beimel (strained forearm) will throw live batting practice Friday. Beimel has not yet pitched in a spring training game.