A Green Party candidate in British Columbia has resigned after concerns were raised about him posting a comment about rape on his Facebook page.

Alan Saldanha, who was running in the riding of Fleetwood—Port Kells, resigned Wednesday afternoon after it was revealed he posted, "If rape is inevitable, lie back and enjoy it!" on his Facebook profile. The comment has since been taken down.

The Green Party's communications director told CBC News Saldanha said the comment was a quote from someone else.

In a written statement, the party said it would accept his resignation.

"The Green Party of Canada is committed to creating a safe environment for all women," the statement read.

The party will not be able to run a new candidate in the riding as the deadline with Elections Canada has already passed.