The Black Sticks exploded to life with a goal one minute into the second quarter, after Keaney finished off a strong attack following a lung busting run from Harry Miskimmin leading to the well taken goal in a scrap at the Pakistan goal mouth.
However, Pakistan reclaimed the lead seven minutes later with a second goal from Haseem Khan, taking a 2-1 lead into halftime.
The Black Sticks had their chances to equalise but couldn't find the finishing touch.
Their closest chances were in the third quarter, after a sprawling dive from Stephen Jenness saw the ball rolling just past the outside post with the Pakistani keeper left stranded.
New Zealand almost scored again just seconds before the end of the third quarter but a great save from Pakistan keeper Mazhar Abbas tipped a rocket of a shot over the bar.
Despite some late pressure and the crowd cheering the hosts on, a goalless second half ensured the score remained 2-1 at fulltime.
Pakistan now lead the five test series 2-1, giving the Vantage Black Sticks one last chance to level the series in the final test at 6:30pm tomorrow night at Trust House Hockey Wairarapa complex in Clareville.