Media playback is unsupported on your device Media caption The first same sex weddings in Scotland are to take place on 31 December

Same-sex couples will be able to get married in Scotland from the end of the year, ministers have announced.

Health Secretary Alex Neil said gay and lesbian couples will be able to tie the knot from 31 December.

Couples in an existing civil partnership will also be able to change their relationship to a marriage from 16 December.

MSPs approved the Marriage and Civil Partnership Act at Holyrood earlier this year.

The Scottish government said the move was the right thing to do, but Scotland's two main churches - the Catholic Church and Church of Scotland - are opposed.

The legislation will see religious and belief bodies opting in to perform same-sex marriages, and ministers have stressed that no part of the religious community would be forced to hold such ceremonies in churches.

Mr Neil said the move was an "important signal that our nation is absolutely committed to the same rights for all our citizens".

He added that Hogmanay would be "a proud and no doubt emotional day for many" and said: "I, for one, can't wait."

Image caption MSPs applauded after plans to allow same-sex marriages were passed

Those couples who are already in a civil partnership will be able to convert that to a marriage from the earlier date of 16 December, as a minimum notice period of 14 clear days is required for marriage ceremonies.

The Scottish government has pledged that those who convert to a marriage in the first year of the legislation will not be charged to do so.

Mr Neil said: "It is wonderful that same-sex couples can now begin to make plans to have their marriage just as any other couple can.

"This historic legislation had overwhelming support across the Scottish Parliament, demonstrating to the world how importantly Scotland views equality."

'Milestone announcement'

Tom French, policy and public affairs co-ordinator for the Equality Network, said: "We are very pleased that after years of campaigning for equal marriage, it is now just weeks away from becoming a reality.

"Today's milestone announcement means that same-sex couples across Scotland will be able to set a date and start planning their weddings.

Image copyright Getty Images Image caption The announcement by the Scottish government was welcomed by equality campaigners

"With the first ceremonies set to take place on Hogmanay, Scotland can be proud that we will bring in the new year as a fairer and more equal country."

He said December 31 2014 would be "a date that is remembered for many years to come, and a profoundly emotional day for those couples who celebrate their commitment to each other".

He also stressed the importance of the legislation for all Scottish lesbian, gay, bisexual, transgender and intersex (LGBTI) people who "grew up in a country where being gay was still criminalised until 1981".

'Silent majority'

A spokesman for Scotland For Marriage, the umbrella group which spearheaded opposition to the legislation, said there was still a "substantial silent majority" of people who were opposed to same-sex marriage.

He said: "Of course, our parliament has voted and we accept the outcome of the democratic process.

"However, there remains the fact that 80,000 people signed a petition against this legislation. There is a substantial silent majority in this country who take and hold different views from our MSPs.

"These people adopt a viewpoint very much opposed to that of the Holyrood metropolitan elite which took the decision to legislate.

"We hope the views of those opposed to this legislation will continue to be respected in the future."