Swansea endured a late scare to hand new manager Roberto Martinez a win at Rotherham on his first game in charge.
Pawel Abbot struck in the 20th minute for his first Swansea goal
Striker Pawel Abbott also struck his first goal for Swansea to set the visitors on their way, heading in a fine cross from Kevin Amankwaah.
Lee Trundle added a second after the break, taking Amankwaah's pass before cutting inside to crash the ball home.
A 90th-minute Martin Woods free-kick gave Rotherham hope and set Swansea on edge, but the visitors held on.
Rotherham: Montgomery, Streete (Worrell 71), Hurst, Fleming, Sharps, Partridge, Diagouraga, Woods, Brogan, Facey (O'Grady 68), Henderson.
Subs Not Used: Liversidge, Newsham, Cochrane.
Booked: Brogan, Fleming, Hurst.
Goals: Woods 90.
Swansea: Gueret, Amankwaah, Tate, Lawrence, Painter, O'Leary, Britton, Robinson (Butler 76), Craney, Trundle (Williams 88), Abbott.
Subs Not Used: Oakes, Jones, Chambers.
Goals: Abbott 20, Trundle 61.
Ref: C Oliver (Northumberland).