Gozie Ugwu's second league goal of the season handed second-placed Raith a 1-0 Scottish Championship victory at Queen of the South.
The visitors were ahead after just 17 minutes at Palmerston Park when Ugwu converted from close range after being set up by Daniel Armstrong.
Armstrong might have doubled their advantage six minutes later but narrowly failed to find the top corner.
Keeper Rohan Ferguson had to produce a fine 35th-minute save to deny Ugwu a second, but the home side might have been back in it three minutes before the break when James Maxwell fired just too high.
Gregor Buchanan, Ciaran Dickson, Rhys McCabe and Connor Shields all went close as Queens resumed in positive mood, although both Brad Spencer and Adam King might have increased Raith's advantage.
Ayo Obileye passed up two opportunities to snatch a point at the death as the visitors held on to stretch their unbeaten league run to five games.