Pat Gilroy's Dublin shook off a slow start at Parnell Park to overcome troubled Offaly with plenty to spare, securing their place in the Leinster SHC for 2019.

Just two points separated the teams after half an hour but Dublin dominated from there to consign Offaly to relegation and Joe McDonagh Cup hurling next year.

Goals from Paul Ryan, just before half-time, and Fergal Whitely after the break eased Dublin to the 17-point win.

The result allows them to breathe out ahead of the final round clash with All-Ireland holders Galway though Offaly's campaign is now over after four defeats.

Kevin Martin's side were competitive against Galway and Kilkenny but lost heavily to Wexford in Round 3 and were always chasing Dublin.

Captain Chris Crummey and Shane Barrett, both in the half-backs for Dublin, were superb while goalkeeper Alan Nolan saved a second-half penalty from Joe Bergin and kept a clean sheet.

Veteran Conal Keaney also impressed after returning from injury and scored 0-02.

Offaly were in the Championship's last chance saloon and got contrasting news beforehand.

Ronan Hughes was cleared to participate after a red card against Wexford and sat among the subs.

That Offaly bench surprisingly included talisman Shane Dooley who was left out of the lineup and only came on in the second-half.

Bergin took over the frees from Dooley and struggled in the first-half, scoring three of the six that he took and wasting that second-half penalty.

The team struggled generally against a Dublin side that set up in orthodox fashion and Offaly registered just two points from play in the opening half.

Both of those came from Dan Currams though Offaly hung in there for half an hour and were just two points down at that stage, 0-07 to 0-05.

That was down to Dublin's wasteful play with the Metropolitans racking up 10 wides in the first 25 minutes and 13 in the half.

The hosts finally got their radar tuned in approaching the break and reeled off 1-03 without reply to open up a big lead.

There was a big turning point in the 30th minute when captain Crummey pointed for Dublin moments after an Offaly penalty appeal from Sean Ryan was waved away.

Dublin then reeled off 1-02 in blitzkrieg period in first-half stoppage time to lead 1-10 to 0-05.

Crummey was the provider for the goal when his long ball broke kindly off Whitely for Ryan to seize possession, spin away from his man and blast home.

Whitely netted himself in the 39th minute after another long ball from Crummey which was this time won by Liam Rushe and laid off.

Rushe, Jake Malone, Fiontan MacGib and Barrett added points and suddenly Dublin were in the clear at 2-14 to 0-6 up.

Dooley's introduction added some quality to Offaly's attack but they needed goals and none arrived.

They were awarded a 50th minute penalty but Bergin's shot was brilliantly batted away by Nolan.

Wing-backs Barrett and Crummey finished with 0-08 between them for Dublin and sub Cian Boland weighed in with two eye catching late scores.

Dublin: Alan Nolan; Paddy Smyth, Cian O'Callaghan, Eoghan O'Donnell; Chris Crummey (0-04), Sean Moran, Shane Barrett (0-04); Rian McBride (0-01), Jake Malone (0-2); Fiontan MacGib (0-01), Conal Keaney (0-02), Danny Sutcliffe; Fergal Whitely (1-01), Liam Rushe (0-02), Paul Ryan (1-05, 0-04f).

Subs: Cian Boland (0-02) for Whitely (51), Tomas Connolly for McBride (55), David Treacy for Keaney (57), Johnny McCaffrey for MacGib (63), Paul Winters for Rushe (64).

Offaly: Eoghan Cahill (0-01, 0-01f); David O'Toole Greene, Ben Conneely, Tom Spain; Dermot Shortt, Pat Camon, David King; Dan Currams (0-2), Damien Egan; Shane Kinsella, Colin Egan, Tommy Geraghty; Sean Ryan, Conor Mahon, Joe Bergin (0-4, 0-04f).

Subs: Shane Dooley (0-02, 0-02f) for Ryan (42), Kevin Dunne (0-01) for Kinsella (48), Ronan Hughes for C Egan (48), Paddy Murphy (0-02) for D Egan (48), James Gorman (0-01) for Bergin (55).

Referee: Colm Lyons (Cork).