Dundee can start believing that a quick return to the Irn-Bru First Division is not as inevitable as many pundits have proclaimed.

Barry Smith, their manager, and his players would have taken more than a crumb of comfort from their win over Hearts on Saturday and may even dare to believe that they can compete in Scottish football's top tier.

The Dens Park side were able to secure a reasonably convincing, albeit narrow, win over a Hearts side who, according to their manager John McGlynn, never found their rhythm. The visitors were put out of step by Matt Lockwood's wonderfully-struck free-kick after 20 hectic minutes and it proved enough to give Dundee only their second win of the season, as well as that faith that they might have turned a corner which had hitherto not come into view.

But, if the 36-year-old full-back's strike raised eyebrows among a loyal and, come the end of the match, euphoric home support, it came as no surprise to Colin Nish. The on-loan Hartlepool United striker is also Lockwood's travelling partner on their daily commute from Edinburgh to Tayside, and it was on one of their trips that Lockwood suggested that his team-mate might like to view his goals on YouTube when he had a few minutes. Nish was astonished by what he saw.

"He's actually scored about 70 goals," said the striker, due to return to his parent club when in January. "I couldn't believe it. I was sitting there for ages watching free-kick after free-kick. There were some crackers on it.

"So, I wasn't surprised he scored against Hearts. I was wanting to take the free-kick but there was no way Matt was letting me near it."

Nish might have had a couple of goals of his own on Saturday as Marius Zaliukas errors allowed him time and space, but on each occasion he dallied too long and allowed the Hearts centre-back to recover.

Predictably, given their precarious league position and paltry league form – Dundee's other league win came against Hearts at Tynecastle two months ago – there was palpable relief among the home supporters. While the visitors worked hard for an equaliser and the home side battled to keep them out, the Dundee defence – in which Kyle Benedictus and Declan Gallagher were an outstanding pairing at centre-half – held firm in a gritty display of stoicism.

"I know what we're capable of," Nish said. "We just need to pick up a few more wins because the other teams haven't felt the pressure we have been feeling of late. If we can get another three points next week at Motherwell, I'm sure the other teams will start to feel it."

Hearts' early composure deserted them after Lockwood's opener and with their midfielders drawn into a terse battle by their counterparts in dark blue, desperation crept in. It was an undignified display for a Hearts side that had reached the semi-finals of the Scottish Communities League Cup earlier in the week and McGlynn conceded that his side were unable to produce their best form.

"It's the second game where we've given Dundee all the encouragement they needed to get a goal," he said. "After that, they had something to fight for and to defend well, which they did. We just never got going. We can really have no excuses for not getting a result today."