Media playback is unsupported on your device Media caption The BBC's Nick Robinson reports on the final hours of the campaign

Both sides in the Scottish referendum campaign have held rallies as they make their final efforts to win over undecided voters.

Independence supporters attended a mass event in the centre of Glasgow, where they were urged to "vote 'Yes' for a prosperous Scotland".

At the same time, pro-UK campaigners gathered nearby to insist the case for independence had not been made.

The latest polls have suggested the result is too close to call.

An Ipsos-MORI survey for broadcaster STV which was published on Wednesday afternoon put support for "Yes" on 49% against 51% for "No" when undecided voters were excluded.

A Panelbase poll released earlier on Wednesday, which was not carried out for any media outlet, suggested support for independence was on 48%, with 52% support for Scotland staying in the UK, once undecided voters were excluded.

This was the same figure as polls released on Tuesday evening by Opinium for the Daily Telegraph, another by ICM for the Scotsman and a third by Survation for the Daily Mail.

In other developments:

Unemployment in Scotland has fallen by 15,000 between May and July, and now stands at 6% - lower than the UK rate of 6.2%.

The Scottish Police Federation has dismissed any suggestions that the referendum could be hit by serious public disorder as "preposterous".

The Spanish prime minister has warned that an independent Scotland would have to reapply to become a new member state of the European Union.

Scotland's 32 local authorities are in the final stages of a huge logistical exercise to ensure the smooth running of the referendum.

Alex Salmond will deliver his final message ahead of the referendum at a rally in Perth on Wednesday evening, where he will say an independent Scotland would be the "closest friend, most honest counsel and most committed ally" to the rest of the UK.

Police Scotland is investigating a complaint that an electoral counting officer in Edinburgh has made public details of the postal ballots cast in the council area.

Deputy PM Nick Clegg has said changes to the rules on Scottish MPs voting on England-only measures should be brought in at the same time as Scotland gets more control over tax and spending.

Businessman Sir Tom Hunter has told the BBC he is not convinced an independent Scotland would be able to agree a currency-sharing deal with the rest of the UK.

Speaking at the pro-independence rally, Yes Scotland chairman Dennis Canavan attacked the "back of a fag packet" pledge of further devolution made by the leaders of the three main Westminster parties.

He told supporters: "A vow - it looks like something written on the back of a fag packet at the fag end of a long campaign. But the people of Scotland will not be fooled.

Image copyright PA

Image copyright Getty Images

"There is only one guarantee of getting more powers for the Scottish Parliament and that is by voting Yes, so let's take that message out, let's take our message out to every street, every city, every town, every village, every community, every workplace, every home in Scotland."

About 2,000 "Yes" supporters later congregated in the city's George Square, where they made a noisy show of their support for the campaign, waving Saltires in the afternoon sun as they cheered speeches and sang along to music.

They were confronted by a small group of "No" supporters who chanted at them before turning their backs on the square.

Meanwhile, Better Together head Alistair Darling urged anyone who had doubts about independence to vote "No".

Addressing supporters alongside former Prime Minister Gordon Brown at a Love Scotland, Vote No rally, he said: "If you have such a momentous decision to take, you need to have certainty.

Image copyright Reuters

Image copyright Getty Images

"What is very clear at the end of this long campaign, from the nationalist side there is no certainty at all. For anyone in Scotland who has any doubt, be in no doubt - you have to say 'No'."

On the final day of campaigning, First Minister Alex Salmond published a letter to the people of Scotland in which he told them they will hold power in their hands as they vote to determine their country's future.

Mr Salmond asked voters to step back from the political arguments and statistics that have defined the two-year campaign and trust in themselves as they go into the polling booth.

He said: "The talking is nearly done. The campaigns will have had their say. What's left is just us - the people who live and work here. The only people with a vote. The people who matter.

Media playback is unsupported on your device Media caption Gordon Brown: "Stand up and be counted tomorrow"

Media playback is unsupported on your device Media caption Yes Scotland chairman Dennis Canavan: "The people of Scotland will not be fooled"

"The people who for a few precious hours during polling day hold sovereignty, power, authority in their hands. It's the greatest most empowering moment any of us will ever have. Scotland's future - our country in our hands.

"What to do? Only each of us knows that. For my part, I ask only this. Make this decision with a clear head and a clear conscience."

The scene at George Square

Simon Dedman, BBC News

More than 2,500 "Yes" supporters have descended on George Square in the heart of Glasgow for a final rallying cry of independence.

As work finishes, more people keep filing on to the square clutching Saltires and "Yes" campaign posters.

There have been chants of "yes, yes, yes" and calls of "shame on the Tory government and the BBC".

On the edge of George Square outside the city chambers, two dozen pro-unionists clad in Union Jack clothing, some with Rangers football tops, have jeered at a group of "Yes" supporters from the opposite side of the road.

Just after 16:00 a middle-aged man unveiled a Union Jack at the front of the rally.

A brief scuffle took place between him and some of the "Yes" campaigners. He was quickly moved on by the police.

It is not all acrimony: one "No" supporter, who rocked up with a motorbike emblazoned with "vote no" stickers, shook "Yes" campaigners hands as he set up his solo "No" stand among a Saltire sea of pro-independence supporters.

The first minister told BBC Radio 4's Today programme that the referendum campaign had been one of the most exhilarating in Western Europe, and said he was "assuming absolutely nothing" about the result.

Watching people queuing to register to vote had been a "humbling" sight, he added, and pledged to honour Clause 30 of the Edinburgh agreement by which both sides agreed to honour the result and work in the best interests of Scotland and the UK regardless of the outcome.

Referring to Spain's apparent opposition to automatic Scottish entry to the EU, Mr Salmond said Scotland had 1% of the EU's population, but 20% of its fish stocks, 25% of its renewable energy and 60% of its oil resources.

He argued that anybody who believed the country would not be welcome in the EU did not understand that Europe "accepts democratic results" and that Scotland "has a huge amount to contribute".

Mr Darling told the Today programme that he thought there would be a "No" vote but even if there were not he would play his part in doing "the best I possibly can" for Scotland.

"I'm not going. This is my country. I'm staying," said Mr Darling. But he said that did not mean he would sign up to the "nonsense" in the Scottish government's White Paper and insisted that "Alex Salmond is not Team Scotland".

Mr Darling also warned that, whichever way the vote went, there would be hard work healing divisions in Scottish society which had emerged during the campaign.

He cited some internet comments and Sunday's demonstration at the BBC in Glasgow, which he said some people found "frightening".

"We all have to say we live in a democratic country; there are some people who have stepped over the line... but we've got to calm things down because we've got to live together."

Scottish Labour leader Johann Lamont and leader of the Scottish Conservatives Ruth Davidson had been out campaigning overnight.

Ms Lamont, along with her deputy Anas Sarwar, met print workers on the night-shift at Trinity Mirror Print Works. The politicians promised "better, faster, safer change" with a "No" vote.Mass rallies mark referendum climax

Referendum night

The BBC's Scotland Decides will bring continuous, up-to-date, coverage as all through the night, as well as comprehensive analysis. On Twitter, keep abreast of the all the action overnight via @BBCPolitics and @BBCScotlandNews.

A Scotland Decides programme presented by Huw Edwards will be broadcast on BBC One from 22:35 BST, while Scotland Decides The Result will be broadcast on BBC One Scotland.

Or follow the results on BBC Radio 4's Scotland Decides programme presented by James Naughtie and Rachel Burden. BBC Radio Scotland will also provide live coverage from 22:00 BST until 06:00 BST.

Mass rallies mark referendum climax