Image copyright Courtesy Meghan Murphy Image caption Meghan Murphy says she wants to ensure the safety of women

A Canadian library has been criticised for refusing to cancel an event hosting a feminist with controversial views on transgender rights.

Hundreds of protesters gathered outside a branch of the Toronto Public Library as writer Meghan Murphy gave a talk inside.

The library defended its decision to allow her talk on gender identity and "society, the law and women".

Campaigners have called Ms Murphy anti-transgender, which she denies.

Toronto police quoted by Global News said officers had been present inside and outside the event to "keep the peace."

Global News reporter Kamil Karamali tweeted that attendees were escorted by police out the back of the building when the talk ended.

What is Meghan Murphy's stance?

Ms Murphy says she wants to ensure the safety of women in places like female prisons, women's refuges and changing rooms.

In Canada, she has spoken against a bill that amended Canada's rights act to prohibit discrimination on the basis of gender expression and identity over concerns it could undermine women's rights by eroding their "safe spaces".

"Under current trans activist doctrine we're not allowed to exclude a man from a woman's space if he says that he's female and I find that quite dangerous and troubling," she told the BBC.

She says she believes the transgender activist movement is "regressive and sexist" and ignores women and girls.

The talk's organisers, a group called Radical Feminists Unite, have said they are "not a hate group, and we do not espouse hate speech, or advocate for the removal of rights from any marginalised group".

The event was sold out.

Judith Taylor, from University of Toronto's Women and Gender Studies Institute, calls Ms Murphy "basically a provocateur".

She thinks that Ms Murphy, in asserting the rights of one group "is implicitly trying to sideline another" and disagrees with Ms Murphy that safe spaces and diversity cannot coexist.

"The more that we start embracing that diversity the better our learning and the better our strength," she said.

What has the library said?

City librarian Vickery Bowles released a statement in mid-October defending the decision to host the event, saying that as a public institution it has "an obligation to protect free speech".

She said that while the library supports the LGBT community and can cancel a room rental if it believes "the event will promote discrimination, contempt or hatred for any individual or group" this case does not violate its rental policies.

Image copyright Toronto Star via Getty Images Image caption Toronto Mayor John Tory called the library's decision "disappointing"

Ms Bowles, who sought legal opinion on the matter, added Ms Murphy has never been charged with or convicted of hate speech in Canada.

The decision to honour the room booking received the support of PEN Canada, a major writers' organisation, on Monday.

What has been the response?

Opponents to the library's decision include Toronto Mayor John Tory, who has called it "disappointing".

An online petition started by three local authors calling for the event to be cancelled had more than 8,000 signatures by Tuesday.

Those who signed it said they would no longer participate in library events if Ms Murphy's talk went ahead.

Pride Toronto, the organisation behind the city's annual pride festival, warned the library "there will be consequences to our relationship for this betrayal".

It said in a statement that Ms Murphy's views are "a denial of the lives, experiences and identities of trans people".

Image copyright LightRocket via Getty Images Image caption A city crosswalk painted in the rainbow colours of the LGBT flag in downtown Toronto

Two city councillors - Kristyn Wong-Tam and Mike Layton - are asking for a review of policies governing the use of community spaces at the Toronto library and other public spaces.

Early this year, a similar talk that included Ms Murphy at a public library in Vancouver drew both protesters and a sold-out crowd. The library was later barred from participating in the city's pride parade.

In May, Ms Murphy was invited to the Scottish Parliament to speak on transgender issues as Edinburgh planned reforms to the Gender Recognition Act to allow people to "self-declare" their legally recognised gender.

Campaigners at the time said Ms Murphy wanted transgender equality protections "ripped apart".

She was also banned from Twitter for stating that "men aren't women" and for "misgendering" transgender women on the site. She has taken legal action against the company.