Image copyright BBC, Glasgow 2014, Getty, PA Image caption The opening ceremony for the 2014 Commonwealth Games in Glasgow will get under way at 21:00

The Queen will formally open the 20th Commonwealth Games in Glasgow later, in front of a 40,000 crowd at Celtic Park.

Organisers said a global TV audience of up to a billion people was expected to watch the event from 21:00 BST.

More than 4,500 athletes from 71 Commonwealth nations and territories will parade during the curtain-raiser.

About 2,000 cast members will perform in a ceremony that organisers have promised "will surprise, delight and be uniquely Glaswegian and Scottish".

The Games will feature 17 sports in 11 days of competition, which begins on Thursday. The closing ceremony takes place at Hampden Stadium, which has been transformed into an athletics venue, on 3 August.

Image copyright SNS Group Image caption Judo player Euan Burton will be the Team Scotland flag bearer at the opening ceremony

Image copyright Getty Images Image caption Squash player Nick Matthew will be the flag bearer for Team England

Image copyright PA Image caption Rhythmic gymnast Francesca Jones will be the flag bearer for Team Wales

The opening ceremony will feature a parade around Celtic Park by thousands of athletes taking part in the Games.

The journey from their accommodation, at the Athlete's Village in Dalmarnock, close to Celtic Park, is expected to take about one hour.

India, as the previous host, will lead the parade, which will end with the current host, Team Scotland.

Teams will parade by region. At the start of each region the crowd will be shown video of some of the work that Unicef is doing in that part of the Commonwealth.

At the end of the parade, athletes and team officials will be seated on the field of play, in the centre of the show.

Live show

The centrepiece of the opening ceremony will be a live show consisting of about 2,000 people.

Just over 1,600 will take part in the stadium with the other 400 having been involved in making pre-filmed content.

The content of the show is secret but head of ceremonies and artistic director David Zolkwer promised it would have a distinct theme.

"Our goal has always been to have the people of Glasgow and Scotland take centre-stage, for them to speak and sing and dance for themselves," he said.

"So, on the night our audience will witness thousands of real people doing extraordinary things - and in the process I know our volunteer cast performers will do themselves, the city and Scotland proud."

Image copyright SNS Image caption More than 4.500 competitors are based at the Athletes' Village at Dalmarnock

Image copyright Glasgow 2014 Image caption The opening ceremony will be shown on a huge LED screen running the entire length of the south stand at Celtic Park

Celtic Park, home of Scottish Premier League champions Celtic, has been dramatically transformed for the opening ceremony.

Europe's largest LED screen has been installed, along with a specially-created stage floor covering the entire pitch, including a walkway specifically designed for the athlete's parade.

The giant screen, which stands across the whole of the South Stand, is almost 100 metres long, 11 metres high and weighs 38 tonnes.

The man charged with delivering the Games, David Grevemberg, chief executive of organiser Glasgow 2014, said the screen would help deliver a "magical" experience.

"It's going to act as our window to the Commonwealth," he said.

"I can guarantee you are going to see a lot of colour, imagery and light coming from this."

The screen will show the Queen formally open the Games when she reads out the message that has been hidden inside the baton.

Media playback is unsupported on your device Media caption The origins of the Commonwealth Games - in 60 seconds

Baton relay

The hand-written message was inserted by the Queen, during a ceremony at Buckingham palace, on 9 October last year.

It was then sealed for its journey of more than 190,000 km through Commonwealth territories in Asia, Oceania, Africa, North and South America and the Caribbean.

Along the way it has been carried by thousands of baton bearers, some 4,000 in Scotland alone, amid a carnival atmosphere in cities, towns and villages around the globe.

Image copyright Reuters Image caption The Queen inserted her hand-written message into the baton at Buckingham Palace on 9 October 2013

Image copyright PA Image caption Dragon's Den star Duncan Bannatyne was among thousands of baton bearers who transported the Queen's message around the Commonwealth amid a carnival atmosphere

The opening ceremony will be followed on Thursday by the first full day of events, including badminton, cycling and swimming.

Almost a million tickets have been sold for the sporting extravaganza, which will be controlled in a security operation led by Police Scotland.

Thousands of officers will be joined by about 2,400 members of the armed forces, prison officers and 17 private security firms.

An army of 15,000 specially-recruited civilian volunteers will be deployed in and around venues to aid athletes and spectators.

The £90m cost of security is being met from the overall Games budget of £472.3m.

'Threats and risks'

Police Scotland Deputy Chief Constable Steve Allen, head of security for the Games. said everything possible had been done to prepare for every eventuality.

"Challenges range from threats and risks that we have to secure the Games from - the ever-present risk of international terrorism, through to organised crime and just managing the sheer numbers of people in and around Glasgow.

"But we've done our work, we know what we're doing, we're ready to go and we can't wait for it to start."

That figure has helped pay for major upgrades in infrastructure across Glasgow.

Two of the showpiece venues to open in the past year include the £125m Hydro arena at the SECC complex, and the £113m National Indoor Sports Arena and Sir Chris Hoy Velodrome, opposite Celtic Park.

The many agencies involved in delivering the Games hope it will leave a lasting legacy of economic, social, cultural, sporting and health-related improvement for Glasgow and Scotland.

Image copyright Getty Images Image caption The £125m Hydro arena is part of the SECC complex which will host gymnastics, boxing, judo, netball, wrestling and weightlifting

Image copyright GCMB Image caption The National Indoor Sports Arena and Sir Chris Hoy Velodrome is one of the showpiece venues of the Games

Scotland's First Minister Alex Salmond and UK Prime Minister David Cameron both said the Games would make a hugely positive long-term impact on Glasgow and the rest of the country.

Mr Salmond said: "The real legacy is the people legacy.

"It's not just in that people have had an opportunity, a life chance - thousands of them in terms of preparations for the Games - but the impact it has on the minds of future generations."

'Great advertisement'

Mr Cameron said: "Scotland has a huge amount to offer the world and I think we'll see that with the opening ceremony and the Games in Glasgow.

"I'm sure from everything I've seen it's going to be well-organised and a great event and a great advertisement for Glasgow, for Scotland and indeed for the United Kingdom."

Glasgow's journey to become host city began in September 2004, when the city was selected over Edinburgh as the Scottish candidate city for the Games.

Glasgow was awarded the Games on 9 November 2007, at the Commonwealth Games Federation General Assembly in Colombo, Sri Lanka, seeing off rival Abuja, in Nigeria, in a head-to-head by 47 votes to 24.

Six years, eight months and 15 days later, Scotland's largest city is finally ready to take centre stage as host of the Games.

Lisa Summers, Commonwealth Games reporter, BBC Scotland

I've asked lots of people lots of questions about the opening ceremony, but information is usually thin on the ground.

I'm told there will be contemporary use of technology that will some how help bring the world in and the spectators out, there will be two big surprise moments, and there's even been quirky rumours of dancing Tunnocks tea-cakes.

We know that Rod Stewart and Susan Boyle will feature, as will children, and the Scottish athletes will take on a bigger role than the usual add-on parade.

It promises to be very Glasgow. Hopefully that Glaswegian humour will translate to the world.

Flying the flag

Image copyright PA

For 11 days, more than 4,500 athletes from 71 nations and territories will compete in 17 sports, with the hope that years of tough training will culminate in a medal win.

They will be cheered on by more than one million fans inside the 13 official venues, with hundreds of millions more watching from around the world.

So, the big question is how many flags will we see, and which ones? Believe it or not there are protocols around what official flags fly and there are rules about the size of the flag a spectator can wave.