Jeremy Swayman had been on a hot streak. But his magic ran out on Tuesday night at Little Caesars Arena, where he was pulled from the game after allowing five goals on 23 shots as the Boston Bruins fell 5-4 to the Detroit Red Wings.

The Red Wings struck first with a goal from former Bruin James van Riemsdyk at 6:52 of the opening frame. With a long stretch pass from deep in the Detroit zone, Albert Johansson found van Riemsdyk in behind the Boston defense at the attacking blue line, springing him up the boards on a breakaway that he used to fire a shot over the shoulder of Jeremy Swayman.

Moritz Seider doubled Detroit’s lead at 13:49 with a shot from high in the zone that made its way through traffic and past a heavily screened Swayman.

A goal from Alex DeBrincat at added to the Red Wings’ advantage at 1:35 of the second period.

At that point, it seemed the Bruins were down for the count. Or at least they were until Johnathan Aspirot finally put them on the board at 11:09, beating Red Wings goalie John Gibson clean with a one-timer from the point for his first career NHL goal.

Boston brought itself to within one at 15:38 when Alex Steeves banged a rebound off into the back of the net for his fourth goal of the year, only to fall back behind by two when Ben Chiarot scored for the Wings less than a minute later.

After Lucas Raymond scored the fifth goal of the night for the Red Wings at 3:55 of the third while on the power play, the Bruins pulled Swayman.

Joonas Korpisalo entered and finished the game in net for Boston by making nine saves on nine shots.

Boston cut the deficit back down to two when Marat Khusnutdinov scored his fourth goal of the season with just over five minutes left to play. The Bruins pulled Korpisalo for an extra attacker, and brought the game to within one when Steeves scored his second goal of the night with 11 seconds remaining, but that was as close as they would get.

With the loss, the Bruins’ record drops to 15-13-0. They will face the St. Louis Blues Thursday night at TD Garden.

This story will be updated

FOLLOW ANDREW FANTUCCHIO ON 𝕏: @A_FANTUCCHIO
FOLLOW BOSTON HOCKEY NOW ON 𝕏 AND FACEBOOK