Aerosmith frontman Steven Tyler provided musical relief last weekend for a waterlogged music festival in Massachusetts with his surprise special appearance this past Sunday.

The spirit of the second and final day of Heritage Days in Scituate, Mass. had been marred by heavy rainfall in the morning hours, which caused two acts to cancel. Prospects for the rest of the day seemed bleak.

But then, during a performance by local blues harmonica legend James Montgomery, Tyler came sashaying out like a musical sidewinder to join his old friend for an impromptu jam session that also featured guest Jon Butcher and fellow Aerosmith cohort Brad Whitford.

The group jammed a few numbers together in the midst of Montgomery’s set, including the blues standard ‘All Your Loving’ and an additional familiar favorite popularized by the Aerosmith boys, ‘Train Kept A Rollin’.’

Tyler reportedly stuck around for two hours signing autographs for fans after the show and also later took to the stage to jam with former members of Sly and the Family Stone.

Montgomery and the members of Aerosmith go way back – he’s known them since the ‘70s and he says that it’s not an “unusual” thing for him to jam with the Aero boys.  “Once every couple times a year we end up on the same stage doing something together and it’s always a lot of fun.  We had a ball and the crowd went crazy.”

Tyler will hit the stage solo in Las Vegas later this year as part of the first iHeartRadio Music Festival.

Watch Steven Tyler And James Montgomery Perform 'Train Kept A Rollin' '