Galway did not have it all their own way but still had too much firepower for a brave Westmeath side in the Leinster SHC at Cusack Park in Mullingar.
The Connacht men led by 1-12 to 0-04 at half-time with James Regan getting the opening goal. Westmeath fought back in the second-half with Niall O'Brien getting a brace of goals and Brendan Murtagh and Paddy Dowdall also finding the net.
But Galway always stayed in front with goals from David Burke (2), Andy Smith and Cyril Donnellan to end up 5-19 to 4-12 winners.
Galway led by 1-12 to 0-04 at half-time having played with the wind, with sub James Regan rattling the net within minutes of coming on.
And Westmeath suffered another big blow four minutes after the restart when David Burke got the first of his two goals for the visitors.
But Westmeath never gave up and skipper Paddy Dowdall typified this when he went forward to take a pass from Robbie Greville and blast to the net after 46 minutes.
Galway responded with Burke getting his second goal but Westmeath again punished sloppy defending at the other end for O’Brien to finish a rebound.
Cyril Donnellan, who scored a hat-trick against Westmeath last year, blasted home after 52 minutes and Andy Smith got his side’s fifth goal to push them 5-16 to 2-09 in front after an hour.
However, Westmeath kept plugging away and O’Brien got his second goal and notions of an outlandish comeback were given further credence when Brendan Murtagh blasted a 20-metre free to the net to make it 5-16 to 4-10.
But that was as near as Westmeath were able to get as the visitors shored up their defence to book a Leinster semi-final place against Offaly on Sunday week.
Galway scorers: N Burke 0-8 (0-6f, 0-2 65), D Burke 2-1, J Regan 1-2, A Smith 1-1, C Donnellan 1-1, C Cooney 0-2, D Hayes 0-2, I Tannian 0-2.
Galway: F Flannery; F Moore, K Hynes, N Donoghue; P Gordon (B Flaherty 52), T Og Regan, J Coen; I Tannian, D Burke; A Smith, N Burke (P Brehony 69), C Donnellan (R Cummins 61); D Glennon (J Regan 21), C Cooney (J Glynn 50), D Hayes.
Westmeath scorers: N O’Brien 2-7 (0-7f), B Murtagh 1-1 (1-0f), P Dowdall 1-0, P Greville 0-1, J Shaw 0-1, E Price 0-1, D Fennell.
Westmeath: S McGovern; C Jordan (T Gallagher 67), A Price, P Fennell; P Dowdall, A McGrath, P Greville; A Clarke, J Clarke (D Fennell 61); B Murtagh, F Boyle (J Gilligan 35), R Greville; N O’Brien, J Shaw, E Price.
Referee: J Owens (Tipperary)