Cotterill on the spot for Blades
The Blades went into the game knowing they had to win to keep the pressure on second-placed Birmingham and took the lead on 35 minutes when Stephen Quinn was fouled by Garry Monk and Cotterill scored from the spot.
The goal went some way to placate the home crowd who were furious after Jamie Ward had a goal ruled out for offside and manager Kevin Blackwell was sent to the stands for protesting against a booking given to Matthew Kilgallon.
In the second half Swansea keeper Dorus De Vries produced two excellent stops to deny Darius Henderson and Chris Morgan, while Ward also clipped the bar.
The win moved the Blades to within a point of Birmingham, while Swansea saw their play-off hopes ended.