Liriano (4-2) went seven innings, giving up two hits while walking five and striking out eight. Mark Melancon chipped an inning in which he allowed a single and struck out two, and Jason Grilli pitched the ninth, giving up two singles, striking out three and getting his major league-leading 23rd save.
Liriano didn't give up a hit until opposing pitcher Travis Wood singled with one out in the fifth. He had, however, walked four by then.
Wood (5-4) was nearly as good, surrendering one run on four hits and two walks while striking out six over six innings.
He gave up a pair of second-inning singles and then retired 11 consecutive batters. Jordy Mercer broke the streak with a double to left. Wood got another out but walked Gaby Sanchez. Russell Martin followed with a drive into the left-field corner for a double that scored Mercer.
Pittsburgh added a run in the ninth when Martin led off with a walk and Pedro Alvarez singled him to third. Martin scored on a fielder's choice.
Ohio crash that killed two caught on camera [VIDEO]
Couple calls 9-1-1 over missing hash browns; assault McDonanld's employees