Swindon boosted their survival hopes with their first win in 19 games against Brentford.
The hosts should have taken a first half lead but Jeffrey Schlupp side footed wide with the goal gaping after a neat Gary Alexander through ball.
Swindon made the breakthrough with 10 minutes remaining when Calvin Andrew turned on the edge of the area and smashed a shot into the bottom corner.
Andrew almost added a second but his dipping drive hit the crossbar.
Brentford manager Nicky Forster told BBC London 94.9:"It was disappointing. I think we didn't get going, we didn't create enough chances.
"We worked very hard, we tried to stop them in midfield from getting the ball and moving it around.
"But we just know that we were off the pace too much at the moment."
Swindon manager Paul Hart told BBC Wiltshire:"We felt we were going to win at some stage and we should have won before now.
"It was a great goal, great strike. He's (Calvin Andrew) deserved that for the work he's put in.
"I'm delighted, absolutely delighted."