Dave Dombrowski needed to make a deal if the Red Sox were going to be for real in the second half.

And give the Red Sox president of baseball operations credit for not waiting until the trade deadline to get a deal done.

Padres lefthander Drew Pomeranz will be joining the Red Sox rotation as the National League All-Star with the third best ERA in MLB was traded to the Red Sox in exchange for top prospect Anderson Espinoza, a.k.a. Pocket Pedro.

The 27-year-old Pomeranz — a former first round draft choice — is having a solid season in San Diego, checking in with a 2.47 ERA in 17 starts to go along with an 8-7 record for the rebuilding Padres. Pomeranz is also easy on the wallet, earning $1.35 million this season and he remains under team control for two more seasons.

“He’s a good pitcher, he’s grown over the last few years,” Dombrowski said Thursday night in a conference call. “He’s a very good pitcher, as shown by him pitching in the All-Star Game. Has three quality pitches, really changed the mix of his pitches. He has a premium above-average breaking ball, he has a fastball that he knows how to use, he gets it up to 94, but he changes speed on. He’s added a cutter.

“People kind of forget, when you follow this guy’s career, this guy was a premium guy coming out of college. He was the fifth pick in the country back then. We absolutely loved him. We were sad he went to a club in our own division at the time. He then got traded in a big trade when Cleveland ended up acquiring Jiminez. He struggled a little bit. Sometimes it takes time for guys to find themselves. He found himself in the bullpen with Oakland. He actually — if you look at his numbers the last couple of years — he pitched well. This year he just took it to another level. We like his ability. We like his age. He’s 27 years of age, coming into the prime years of his life.”

The 18-year-old Espinoza — who touches 100 on the radar gun — was the top-ranked pitcher in the Red Sox organization. He’s currently sporting a 4.38 ERA in 17 starts for Single-A Greenville where the competition is much older than the young Venezuelan. Espinoza is ranked No. 15 in Baseball America’s midseason Top-100 prospects list.