At the end of Tony Roper's first week working in Bowhill Colliery in Fife, the wet-behind-the-ears teenager from Cardonald was taken by surprise.

Roper may have been working beside women, but they weren't shy about hauling the youngster away from his workplace, ripping off all of his clothes and smearing him from head to toe with copious amounts of axle grease.

"They got me everywhere," says Roper, who as an actor is associated by most people as Rab C Nesbitt's sidekick Jamesie Cotter, "and I mean everywhere."

It was a rite of passage he never forgot, and while the incident didn't trickle down into his play, The Steamie – set in a Glasgow wash-house in the post-second world war era – the larger-than-life influence of the women he depicted is evident throughout.

"All the women in The Steamie are amalgamations of women I knew growing up," Roper says on the eve of directing a 25th anniversary tour of a play that has become a contemporary classic, and one of the most performed plays to come out of Scotland ever. "And there were no shrinking violets, I tell you. It was a different society then. The women had had to do an awful lot of manual labour during the war, and they didn't go back to baking scones after that. They'd be scrubbing the stairs and everything else. They couldn't relax or go to the pub like they can now, or they'd be regarded as a fallen woman or something, so if you don't have an outlet, you have to try and find one."

Roper's observations pretty much sum up where The Steamie comes from. Set one Hogmanay, at some point in the 1950s, over one long night four women find a sense of cross-generational community away from their menfolk which looks a little bit like sisterhood. It's a simple enough premise, but the play's common touch goes beyond easy sentimentalism to tap into something audiences have empathised with worldwide, while the truncated 1988 TV version came second in a public poll of STV's 30 best loved shows.

"If I knew what it was that made it work," Roper admits, "I'd do it 100 times over. I've written other plays, and they've all been successful, but they've never had the effect of The Steamie. For some reason it clicked with the women who went to see it. Now, if I'm not being too immodest , I like women, and not the artificial kind we see in magazines who all say the same things. That's a manufactured thing, but the women I know, and the women in The Steamie, they all say what they think, and they don't hold back.

"There had been plays about the male workplace, like The Bevellers and Willie Rough, but I don't think there had ever been anything written about women in the workplace, and I don't even think the women the play is about thought of what they were doing as work."

For all the play's apparent runaway success story, The Steamie very nearly never happened at all. While an actor with a solid track record on stage and screen since the 1970s in the likes of Bill Bryden's play, Willie Rough, as well as playing alongside the late Rikki Fulton in seminal TV comedy, Scotch and Wry, Roper had never written a play.

Indeed, according to him, he only did so after "somebody offered me money. It's a working class thing. If someone offers me money I'll put my heart and soul into it, but the person who gave me money the first time round didn't like it, so I only got half the money."

For the next four years, Roper hawked his script around every theatre company in Scotland, but there were no takers. Roper happened to mention it to actress Elaine C Smith, who he was working with on TV sketch show, Naked Video. Smith took it to Wildcat, the popular music theatre company founded by David MacLennan and David Anderson to take theatre to the people in similar ways to those pioneered by John McGrath's 7:84 company, which MacLennan had been a founding member of.

"Wildcat had a grant to do a play on communities," Roper remembers, "but they didn't have one. So when Elaine C Smith told me this I said I've got one, but nobody wants to do it."

However, The Steamie's opening night on May 1, 1987, at the Crawford Theatre at Jordanhill College in Glasgow, proved everyone wrong.

"It gave us all a shock," Roper remembers, "including all the Wildcat people, the actors and actresses and the director, Alex Norton. Before we opened, I was thinking, well, I hope it doesn't embarrass people. At the end of the first night, I thought we'd got away with it. Then in the morning I got a call from Wildcat to say that their answer machine was red-hot. A week and a half in and the whole run was sold out. Then Wildcat did a bigger tour, and it took off even more. It's lasted this long, and it'll probably outlive me."

Now aged 70, and still going strong playing Jamesie Cotter in the revised Rab C Nesbitt, Roper is philosophical about The Steamie's protracted success story.

"When you hand somebody something on a page," he says, "you can't always envisage how it will come off it, and that's what had happened.

"I wrote it, not as a writer, but as an actor, which is something that was unheard of at the time. I wrote it as a performance.

"There's no great message in the play. It's not anti this or anti that, but, writing it as an actor, I could see what would get a good reaction, and it's a very technical exercise to make it work. If one actor stands up as another sits down, if they get it wrong the whole play'll fall apart. We don't do an awful lot of laughing in rehearsals."

Onstage, however, in a play that has also worked in countries such as Finland, where even today a company books the rights for six months of every year, things are considerably different.

"I think it's a huge laugh," says Roper. "You don't need to be old enough to have been to a steamie to get the laughs or to get Dave Anderson's songs. It's a very warm play, and people cry, because they can remember their grannies or their mothers who they ignored until it was too late. The Steamie's in the school syllabus now and everything, and I'm told by various theatre directors that a lot of younger actresses do one of the speeches in it a lot, and they're slightly sick of hearing it."

This is a wonderful back-handed compliment for the play, as too is Roper's story of a reaction emanating from a lot closer to home.

"My mother was still alive when I wrote it," he says, "and when it became successful, people would ask her if she was related to that Tony Roper. She would always say no. It wasn't that she was ashamed of me in any way. She just thought it was being boastful. That was the era she came from. People wouldn't show off about things like that. It's a working class thing."

The Steamie, Adam Smith Theatre, Kirkcaldy, March 21-24, then touring