McAllister headed the league leaders in front after five minutes. Steven Notman equalised before the interval, but McAllister restored Peterhead's lead with a 62nd-minute free-kick and Dean Cowie added a third to seal the points.
Second-placed Clyde drew 1-1 away to Stirling Albion. John Sweeney put Clyde ahead before the break, but Graham Weir drilled home a 69th-minute equaliser.
Annan Athletic remain third after a 2-1 home success over Elgin City. Shane Sutherland's 63rd-minute header gave Elgin the lead, but they then had Raymond Jellema sent off. Scott Davidson equalised with the resulting penalty and Kenny Mackay struck Annan's late winner.
Bottom club and managerless Queen's Park suffered a sixth successive defeat, losing 2-1 at Albion Rovers. Liam Cusack and Scott Chaplain had Rovers 2-0 up before Michael Dunlop's own goal halved the deficit.
Montrose twice came from behind twice to rescue a 2-2 draw away to East Stirlingshire. Garry Wood and Graham Webster were their scorers.