There was a welcome return to Swansea's starting line-up for Ferrie Bodde while Craig Beattie, who spent time on loan with the Blades, was on the bench. Chris Morgan passed a late fitness test to skipper the visitors.
The Swans began with Alan Tate and Gary Monk in central defence leaving Ashley Williams to take up a position just in front of the back four.
There was an anxious moment early on when Bodde needed attention and was forced off the field after just seven minutes to be replaced by Trundle.
The Swans pushed United back and Monk forced a save from Mark Bunn after meeting a free-kick from Lopez.
Keith Treacey left the field injured in the 27th minute to be replaced by Wales international Ched Evans but it was Swansea's Dyer who brought a full-length save from Bunn who then had to react sharply to clear from the onrushing Gorka Pintado.
With half-time approaching, Mark Gower and Federico Bessone combined down the left but the final pass went high and wide. Lopez tried a shot from distance but it never troubled Bunn in the visitors goal.
The Swans took the lead in the 50th minute when Nick Montgomery brought down Trundle just inside the area. Trundle got up to lash the ball into the right-hand corner of the net for Swansea's first goal in over six hours of football.
Blades striker Darius Henderson had the ball in the net seven minutes later from a David Cotterill cross but was flagged offside.
They did equalise in the 73rd minute when James Harper's shot was back-heeled into the net by Stephen Quinn.
Lopez received a second yellow card in the 77th minute to leave the Swans holding on with ten men but a superb ground-shot from Butler in the 82nd minute restored the lead.
Despite going down to nine men when Dyer was dismissed in the first minute of stoppage time, the Swans survived tremendous pressure to hang on to all three points.