It was the perfect way to start the second half at Priestfield.
The opening 45 minutes had been full of endeavour from both sides, although there was a distinct lack of attacking flair.
But Matty Kennedy gave the 1,300 travelling fans plenty to celebrate just 26 seconds after the interval.
He picked up the loose ball when Curtis Main’s header had come back off the post and slammed it into the net.
That proved enough for Pompey to beat Gillingham and move up to 13th position in the League One table.
Kennedy said: “I’m delighted with the win. We really needed that because we’re trying to find a bit of consistency in our results.
"Sometimes I can be a little bit lazy to be honest, so I need to ask a bit more of myself."
“The gaffer’s told me to get myself into the box a bit more and so when the ball fell to me, I just smashed it into the net.
“Sometimes I can be a little bit lazy to be honest, so I need to ask a bit more of myself. I have to add goals to my game, so it’s pleasing I’ve got the winner.
“The fans, players and staff have all welcomed me here, so it means I’ve been able to settle very quickly. I think that’s shown on the pitch.
“We can still get stronger when the injured players come back, but we’ve shown that we’ve got a decent squad.
“My hamstring’s been a bit sore and I wasn’t sure if I’d be able to get through the whole game, but thankfully I survived.”
Kennedy was impressed with the performance of makeshift defender Oliver Hawkins, but felt the whole team contributed towards a clean sheet.
He said: “I thought we did well very defensively, especially towards the end when they’re always going to put a bit more pressure on you.
“Oli is a striker who’s come from non-league, but he’s had to be used at the back and he’s been brilliant for us.
“But it’s a team game and everyone had to contribute to what was a really encouraging defensive display. We can all take credit for that.”