The Church of Scotland has voted to end an moratorium on ordaining gay ministers.

A temporary ban was instituted in 2009 after anger over the ordination of an openly gay man, the Rev Scott Rennie.

Today, the church’s general assembly in Edinburgh voted to lift the ban, the Guardian reports.

The general assembly has not yet decided whether to allow sexually-active gay clergy or demand celibacy from gay ministers.

Research has found that one in five church members have said they will leave if out gay ministers are permitted.

However, one in ten said they will leave if the ban continues.

This is the first time the church has explicitly agreed a policy on homosexuality, church officials said.

Rev Rennie’s appointment caused deep divisions between traditionalists and liberals.

The church was threatened by a schism two years ago when an openly gay man in a relationship was ordained.

The minister, who lives with his partner, was appointed as minister of Queen’s Cross Church, Aberdeen. His ordination was opposed by many in the church but his congregation voted overwhelmingly for him to become their minister.