Portsmouth goalkeeper Craig MacGillivray has extended his contract until the summer of 2021.
The 26-year-old, who joined Portsmouth from Shrewsbury last year, has played 30 times and kept 11 clean sheets this season.
The Fratton Park club are four points clear of Luton at the summit of Sky Bet League One.
“I’m obviously delighted to have signed a new contract and committed my future to the club,” said MacGillivray.
Manager Kenny Jackett added: “It’s still very early in his Pompey career, but we wanted to reward him and give him a longer-term deal.
“He’s been a very good addition to our squad and I’m sure he will continue to prove that in the years to come.”