James McAvoy battled to have his 'Filth' character killed off.

The 34-year-old star said it could have turned out differently for corrupt cop Bruce Robertson, who committed suicide at the end of the film - which is based on Irvine Welsh's best-selling novel - if it weren't for his campaigning.

He told BANG Showbiz: ''I love the fact that he killed himself, I wasn't worried about the ending.

''I was worried when people were trying to make it a happy ending, there was always talk of 'maybe he should make it', 'or people don't know if he's killed himself or not'.

''I think helping to bring Irvine Welsh's abusive, beautiful, nasty and hilarious, almost Dickensian world onto screen and do it well - it's a privilege.''

McAvoy was pleasantly surprised by how well the film was received, raking in over £4 million at the box office.

James said: ''When it was made everyone was saying you'll make £2 million at the box office, and we'll do well here, but we made over twice the budget.

''I don't really care about the money but it's an indicator of the fact that an independent film managed to get people to come and see it.

''It means that British film can do it, on its own, it's remarkable. I'm really proud of it. When I was growing up I was like, 'That's a British film, I'm not going to see that, because it's probably sh*t', it feels like that's changing.''