But it was Townsend and co who were smiling come the final whistle as two van der Merwe tries and one for Chris Fusaro was more than enough to get the Warriors their first win of the season, handing Ospreys the unwanted record in return.
Things were looking bad for the Ospreys as early as the third minute as Canadian van der Merwe fielded a high kick from Dan Biggar in his own 22, shrugged off some early attention before racing away to blaze over in the left corner, Duncan Weir unable to land the tricky conversion.
And Glasgow extended their lead on 12 minutes but it came at a price as Chris Cusiter tapped a penalty and headed for the line only to fall awkwardly and be helped off the field with a bad-looking shoulder injury, all in front of the watchful gaze of Scotland head coach Andy Robinson who was in attendance.
Cusiter was replaced by Henry Pyrgos but the Scottish international's presence was still felt as, in tapping the penalty, Ospreys were penalised for not being ten metres back, allowing Weir to land his first kick of the game.
Glasgow were next on the scoresheet again but had to wait until just before the half hour to extend their lead.
But they got a huge helping hand from Ospreys scrum-half Rhys Webb as he fumbled the ball at the back of the scrum, allowing flanker Fusaro to punce on the loose ball for the easy try, Weir adding the extras for a commanding 15-0 lead.
The hosts almost made an immediate response as a clever grubber kick from lock Ian Gough looked to have Tom Grabham in the clear, but his kick-on found the touchline with nothing but open space in front of him.
This is how it stayed until four minutes after the break as Webb's day went from bad for worse, the scrum-half being sent to the sin-bin after being offside allowing Weir to put the visitor's further ahead with a penalty.
But just five minutes later Glasgow found themselves down to 14 men too as James Eddie also saw yellow for persistent infringing.
And the Ospreys made the most of it as despite some desperate Warriors defending, lock Ian Evans bundled his way over shortly afterwards, Biggar adding the extras to bring the score to 18-7.
But on 54 minutes Glasgow once again had an 18-point cushion and once again it was the Ospreys' own doing.
Hanno Dirksen was unable to keep a wayward pass in touch just five metres off their own try line and after the lineout van der Merwe forced his way over for his second try of the night, Weir kicking the conversion.
Biggar got the Ospreys into double figures with a 61st-minute penalty but that was as good as it got as Warriors replacement Ruaridh Jackson replied with one of his own five minutes from time to hand the Ospreys a first loss to Scottish opposition on home turf since 2009.
|Ospreys Score Card|
|Glasgow Warriors Score Card|
|DTH van der Merwe||2||10|