Conor Cooney was the hero as Galway boss Henry Shefflin earned a dramatic win over his home county Kilkenny at Pearse Stadium.
Shefflin's Tribesmen edged Brian Cody's Kilkenny out by a point at Pearse Stadium as Cooney kept his nerve in the fifth minute of injury-time.
His free from 65 metres secured the last-gasp win after substitute John Donnelly had rattled the Galway net with a goal which looked set to give the Cats a share of the spoils.
It was the sort of free which Shefflin delivered many times for Ballyhale Shamrocks and Kilkenny during his illustrious playing career.
The sides were level four times in the opening half but Galway went in leading by 1-17 to 2-8 after a frenetic opening half.
Kilkenny captain Eoin Cody, a nephew of Shefflin, opted to play against the wind and he blasted home their opening goal after a pass from Walter Walsh to lead by 1-2 to 0-3 after just six minutes.
TJ Reid, who missed two frees in the opening half before going off at the break as he continued his return from injury, found the range from 60 metres, before Billy Ryan shot home their second goal on 16 minutes after a good pass from Cody.
But with Galway forcing multiple turnovers, they pulled away as Tom Monaghan and Joseph Cooney both shot three points from play by the break,.
The Tribesmen hit 1-10 from turnovers before the interval, with Johnny Coen getting the goal.
Conor Cooney extended the lead with his fourth free of the game a minute after the restart but Kilkenny took over and landed the next seven points without reply in a blistering period of fast hurling. Walter Walsh excelled in that period and the sides were level for a fifth time in the game.
Galway pulled away with three quick points but then Kilkenny struck after 73 minutes when Cody set up sub John Donnelly and his bouncing shot found the net to tie the sides.
There was still time for more drama when Monaghan was fouled by Paddy Deegan. Cooney kept his nerve to steer the winner from 65 metres in the 75th minute of a gripping contest.
GALWAY : E Murphy; D Morrissey, Daithi Burke, J Grealish; P Mannion 0-1, G McInerney, F Burke 0-2 (2 sidelines); David Burke 0-1, J Coen 1-0; T Monaghan 0-3, C Cooney 0-06 (6f), J Cooney 0-4; C Mannion 0-2, B Concannon 0-4, C Fahy 0-1.
Subs: T Killeen for Grealish (41-43 blood), C Whelan for Fahy (45), G Lee for Grealish (52), TJ Brennan for Coen (72).
KILKENNY: E Murphy; M Butler, H Lawlor, T Walsh; M Carey 0-1, P Deegan, C Browne; J Maher, A Mullen 0-1; C Buckley, P Walsh 0-2, TJ Reid 0-3 (2f); W Walsh 0-3, B Ryan 1-0, E Cody 1-2. Substitutes: A Murphy 0-5 (4f) for Maher (31), T Phelan for Reid (half-time), D Blanchfield for Browne (42), J Donnelly 1-0 for Buckley (55), M Keoghan for Ryan (66).
Referee: Colm Lyons (Cork).
Get the latest sports headlines straight to your inbox by signing up for free email alerts