Angela Rayner has said she is happy to sit on the Commons benches with Jared O’Mara despite condemning his online posts as “absolutely abhorrent”.

The shadow education secretary said O’Mara had changed his views in the 15 years since he wrote a series of homophobic and sexist comments on a music website.

Yesterday O’Mara, who ousted Nick Clegg from Sheffield Hallam at the general election, resigned from the Commons women and equalities committee following the furore over a string of offensive remarks including an attempted joke about staging an orgy with members of the Girls Aloud pop band and another about a sex attack on jazz star Jamie Cullum.

Today Rayner told the BBC’s Today programme that O’Mara had changed.

“I am happy to sit alongside him, because he made those comments 15 years ago,” she said.

“Jared has said he held those views 15 years ago, but he changed his views, that’s the important thing,.

“He recognised those views were absolutely abhorrent and wrong and he changed those views. And 15 years on he is not the Jared that made those comments some years ago.”

O’Mara has issued a full apology for his posts on the Drowned in Sound website and said they were written at a “difficult time” in his life, although he added “that is no excuse”.

“I am deeply ashamed of the comments I made online… Misogyny is a deep problem in our society. Since making those comments 15 years ago, I have learned about inequalities of power and how violent language perpetuates them. I continue to strive to be a better man and work where I can to confront misogyny.”