The Blues played uncharacteristically messy hockey Tuesday night at Scottrade Center.

They allowed 41 shots, their most all season. But they beat the Sharks 4-2 anyway, thanks to a bit of good fortune and rookie Jake Allen's steady goaltending.

Both elements were welcome for a team still striving to gain traction in the Western Conference race. Everything is magnified in the 48-game season — so bad breaks and bad netminding have taken a big toll on the Blues.

This represented a reversal of fortune. The Sharks attacked in waves, bombarded the Blues . . . and still left the rink frustrated.

When was the last time a Blues' opponent felt that way?

Starting Allen in goal proved prescient. Blues coach Ken Hitchcock made the move despite seeing signs of progress with Jaroslav Halak’s performance at Anaheim.

The Ducks, winners of 11 straight home games, exploited some egregious Blues special team breakdowns while rallying to victory. But Halak played well otherwise and made several nice saves to give his team a chance to win.

Yet Hitchcock came back with Allen to face the Sharks in the opener of a three-game homestand. It worked, so the Note’s goaltending situation remains muddled.