Defender Hughes followed up to fire home after Josh Windass' 78th-minute free-kick had rebounded back off a post, but promotion rivals Oxford and Bristol Rovers also won to ensure the race for a top-three finish stays alive with one game remaining.
Oxford beat Carlisle 2-0 at Brunton Park to stay in the third automatic promotion spot thanks to goals from Chris Maguire, who converted a fourth-minute penalty after he had been fouled by Luke Joyce, and Liam Sercombe (74).
Billy Bodin's double helped secure Bristol Rovers a 4-1 win at relegated York and kept alive their hopes of back-to-back promotions.
AFC Wimbledon beat Plymouth to secure League One promotion
Bodin struck in the 19th and 71st minutes to take his season's tally to 12 before late goals from Jermaine Easter (80) and Lee Mansell (88) ensured Rovers stay fourth, a point behind Oxford with it all to play for next week. Kenny McEvoy (81) replied for York.
Northampton, who secured the title two weeks ago, were presented with the League Two trophy at Sixfields after their 2-0 win against Luton.
Zander Diamond headed his second goal of the season in the fourth minute and John Marquis (36) added a second.
AFC Wimbledon's goalless draw at Stevenage was enough to clinch them the final play-off place after Cambridge's hopes were dashed by Plymouth's stoppage-time equaliser in a 2-2 draw at the Abbey Stadium.
Jamille Matt (71) put Plymouth ahead before late goals from Ben Williamson (84) and Jimmy Spencer (86) appeared to have kept Cambridge in the play-off race, but Graham Carey equalised for the visitors in the second minute of time added on.
Portsmouth climbed up to fifth following a 2-0 win at Hartlepool United courtesy of goals from Kal Naismith (57) and Conor Chaplin (84), while Ollie Palmer headed the only goal in Leyton Orient's 1-0 home win against Mansfield.
Dagenham & Redbridge, relegated a fortnight ago, secured only their third home win of the season with a 3-0 victory against Crawley, for whom new manager Dermot Drummy made a losing start.
Christian Doidge struck twice in as many minutes (51 and 53) to put Dagenham in control and Ashley Hemmings (80) struck their third.
Harry Cornick fired a stoppage-time winner for Yeovil, who twice hit back from two goals down to win 4-3 at Barnet.
Michael Gash (22) and John Akinde, who converted his 21st goal of the season from the penalty spot seven minutes into the second half after he had been fouled by Ryan Dickson, put Barnet two up.
Matt Dolan pulled one back for Yeovil three minutes later and after Akinde (62) had headed his second, goals from Nathan Smith (63) and Francois Zoko (76) hauled the visitors level before Cornick's winner in the fifth minute of time added on.
Jayden Stockley's 89th-minute penalty, after Adam Dugdale had handled, secured Exeter a 1-1 home draw against Morecambe, who had taken the lead through Kevin Ellison four minutes earlier.
Genaro Snijders (39) clinched Notts County a 1-0 win at Newport.
Penalty levels League Two play-off first leg between Portsmouth and Plymouth Argyle
Oxford and Bristol Rovers grab promotion as Accrington Stanley blow it