Image copyright Getty Images Image caption Dunham said she had "internalised the dominant male agenda that asks us to defend it no matter what"

TV actress and writer Lena Dunham has said publicly defending a writer on her show Girls after he was accused of rape was "a terrible mistake".

Writing in The Hollywood Reporter, Dunham apologised for speaking up for Murray Miller out of "blind faith".

She originally spoke about it last November after Miller was accused of assaulting an actress when she was 17.

Miller has always denied the "outrageous" allegations, and in August prosecutors decided not to charge him.

The Los Angeles County District Attorney's office didn't pursue a prosecution because of the expiry of the statute of limitations and "inconsistencies and the delay in reporting", The Wrap reported in August.

Image copyright Getty Images Image caption Murray Miller's lawyer said he had "overwhelming evidence" to prove his innocence

Dunham, writing as guest editor of The Hollywood Reporter's Women in Hollywood edition, explained why she originally said she had "insider knowledge" that made her believe the accusation was false.

"When someone I knew, someone I had loved as a brother, was accused, I did something inexcusable: I publicly spoke up in his defence," she wrote.

"There are few acts I could ever regret more in this life. I didn't have the 'insider information' I claimed but rather blind faith in a story that kept slipping and changing and revealed itself to mean nothing at all."

She added: "It's painful to realise that, while I thought I was self-aware, I had actually internalised the dominant male agenda that asks us to defend it no matter what, protect it no matter what, baby it no matter what."

Dunham felt a fierce backlash last year after publishing her original statement, which was written jointly with her fellow Girls showrunner Jenni Konner.

She then apologised, saying it was "absolutely the wrong time to come forward with such a statement".

At the time, Mr Miller's lawyer, Don Walerstein, said his client "categorically and vehemently denies" the allegations.

He also said his legal team had "overwhelming evidence directly contradicting these false and offensive claims".

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.