Tranmere were made to work hard for their fifth home league win by managerless Barnsley, as the visitors made much of the running but had no luck in front of goal.
The decisive score came after only two minutes when theunmarked Graham Allen netted with a close range right foot shot, after Barnsley failed to clear a Micky Mellon free kick.
Barnsley went on to create numerous chances, but home keeper John Achterberg made fine saves from Chris Lumsdon and Leo Bertos, whilst Lumsdon put a fine twenty yard effort just inches wide.
Tranmere were often penned in their own half, but nearly snatched a second goal in the 69th minute when a powerful effort by Tom Curtis was beaten out by keeper Andy Marriott.
Barnsley finished strongly but saw Lumsdon's 25 yard shot headed off the line by Shane Nicholson, with the keeper stranded, and a lob by Bruce Dyer bounce just wide.
Mellon was outstanding for the victors, with Lumsdon and Chris Morgan impressing for Barnsley.
"We gave as good as we got and probably more," claimed Barnsley caretaker boss Glyn Hodges.
"We paid for a nightmare start when we were all over the place but went on to cause Tranmere plenty of problems."
Tranmere manager Ray Mathias said: "It was always going to be tight and I always thought one goal might win it. The players worked superbly hard to get a result and it should certainly boost our confidence."