United ended the campaign with a 3-0 victory over Dundee but Chris Kane’s 70th-minute winner for St Johnstone at Aberdeen denied them a top-four finish.
And Saints could join Inverness Caledonian Thistle in Europe next season if the Highlanders beat Falkirk in next week’s Scottish Cup final at Hampden.
McNamara said: “We wanted to finish on a high note so that was important for everyone – the players and fans. It would have been a long summer if we hadn’t beaten them today so it was a good victory and I thought we deserved it.
“After the second goal you could see the shackles come off a bit. It’s not something we’ve had for a while, where we have the cushion to settle down, play and enjoy the ball. So I’m delighted for everyone, especially the fans today.
“You’ve got to congratulate St Johnstone. We’ve just fallen short of getting that fourth place and possibly Europe depending on the result of the cup final.
“There are a lot of things to improve on but we’ve won one more game than we did last season when we finished fourth.
“I think the last time the club won 17 games in a season they finished third and qualified for Europe so it has been raised a little bit this season, but we need to come back and make sure we are stronger and ready for the new campaign.
“I’ve been excited about the new season for a while.”
Dundee have only taken one point from seven games since last month’s derby win and manager Paul Hartley was left to bemoan basic errors at Tannadice.
Goalkeeper Kyle Letheren gifted Nadir Ciftci United’s first goal with a poor clearance and Thomas Konrad brought down the United striker to allow him a second from the spot and Blair Spittal later ran clear to net the third.
Hartley said: “It was a bit strange. I thought we actually played quite well.
“We were good in the first half in terms of possession and using the ball, but we’ve got to defend better. The goals we lost were three mistakes.
“We gifted them the first one. The second one is a penalty and you’ve got to stay on your feet. I didn’t really see it and Thomas thinks it was a soft penalty. But as a defender you can’t go to ground. The third one was just bad defending.
“So they took their chances and we didn’t. But it’s still been a satisfying season. Getting into the top six has been a great achievement.”