Media playback is unsupported on your device Media caption A minute's silence is held at the Ulster Memorial Tower in Thiepval, France.

The centenary of the Battle of the Somme is being marked across Northern Ireland and in Thiepval in France, where thousands of Irishmen died.

The opening day, 1 July 1916, remains the bloodiest in the Army's history.

Image caption Memorial events are taking place at Thiepval Woods in France on Friday

A total of 19,240 British troops were killed within 24 hours, and almost a tenth of those who died that first day were from the 36th Ulster Division.

Commemorations have been held in towns and cities in Northern Ireland and at Dublin's War Memorial Gardens.

Media playback is unsupported on your device Media caption Stephen Humphreys, 17, sounds the Advance, playing the same bugle used 100 years ago

Media playback is unsupported on your device Media caption Irish fortunes varied on the first day, as we chart their progress over the opening hours

BBC News NI's Ciaran McCauley in Thiepval

When the first guests arrived at the Ulster Tower, the atmosphere was convivial and almost festive.

Many smiling faces had their photo taken in front of the tower, with poppy-spotted fields behind them.

Some had arrived in military uniform, others wore rows of medals belonging to those they were here to remember.

But as the commemoration drew near, there was no mistaking the reverence and solemnity of the occasion.

Media playback is unsupported on your device Media caption Corporal Hyndman reads a letter from Leslie Bell about the first day of the Battle

In France, the village of Thiepval is close to where the 36th Ulster Division began their attack on German lines on 1 July 1916 and is now the site of the Ulster Memorial Tower, a 70ft (21m) monument that commemorates their sacrifice.

Media playback is unsupported on your device Media caption The Piper's Lament begins as the Royal Irish Regiment lay a wreath at Connaught Cemetery

Men from all over the island of Ireland fought at the Somme, and the British, Irish and French governments were represented during a ceremony at the tower on Friday.

Media playback is unsupported on your device Media caption In Dublin, a military ceremonial event was held at the War Memorial Gardens at Islandbridge

The Queen led the UK's national commemorations from London, having opened an overnight vigil on Thursday in Westminster Abbey.

First Minister Arlene Foster travelled to France to lay a wreath on behalf of the people of Northern Ireland.

Media playback is unsupported on your device Media caption BBC News NI looks at the numbers behind the Battle of the Somme.

In Northern Ireland, an overnight vigil took place at the Somme Museum near Newtownards in County Down.

It was followed on Friday morning by a number of military, civil and religious ceremonies in cities and towns, including Belfast, Lisburn, Londonderry, Enniskillen and Hillsborough.

Image copyright MOD Image caption A memorial event took place at Thiepval Barracks in Lisburn

Just before 07:30 BST, the 206 (Ulster) Battery Royal Artillery fired one of their L118 light guns at Hillsborough Castle in County Down, the Queen's official residence in Northern Ireland.

At about the same time, soldiers at Thiepval Barracks in Lisburn in County Antrim mustered at the Thiepval Memorial for an ecumenical commemoration service.

The 36th Ulster Division was one of the few divisions of the Army to make significant gains on the first day of the battle, but it suffered terrible losses.

Image caption A piper plays a lament at Helen's Tower in Bangor, where the 36th Ulster Division trained and drilled at the outbreak of the war

Many people from Northern Ireland, including relatives of Somme veterans, have travelled to France for the commemoration events.

Prime Minister David Cameron and several senior members of the Royal Family, including Price Charles, were joined by the French President Francois Hollande at the Thiepval Memorial.

Image caption Irish President Michael D Higgins, Prime Minister David Cameron and the Prince of Wales are attending a ceremony at Thiepval

Image copyright MOD Image caption A short service at Thiepval Memorial, Lisburn was conducted by the senior chaplain Rev Alexander Bennett

The government was represented by Northern Ireland Secretary Theresa Villiers.

Irish President Michael D Higgins and the Irish Heritage Minister Heather Humphreys also travelled to France to pay tribute to the estimated 50,000 Irishmen who were killed while serving in the British, Commonwealth or US armies in World War One.

Labour Party leader Jeremy Corbyn also made the journey to Thiepval and paid tribute to Irishmen who died at the Battle of the Somme.

He said the commemoration events were "deeply moving" and brought back "the horrors of war".

Media playback is unsupported on your device Media caption Labour Party leader Jeremy Corbyn paid tribute to Ulster and Irish soldiers

At the UK's national ceremony in London, a 24-year-old soldier, originally from Newtownards, played a rendition of the Flowers of the Forest.

Media playback is unsupported on your device Media caption Irish Guard Richie Spence plays Flowers of the Forest at Westminster commemoration

L/Cpl Ritchie Spence, who is a member of the Irish Guards, joined the Army when he was 16 and was shot and wounded in the arm while serving in Afghanistan in 2010.

Back in Belfast, the annual wreath laying ceremony took place at the Cenotaph at Belfast City Hall, remembering men from both the 36th (Ulster) Division and 16th (Irish) Division who lost their lives at the Somme.

Image caption A wreath laying ceremony was held at Belfast City Hall to mark the battle's centenary

Londonderry marked the centenary with a parade, a drumhead service and the launch of a World War One memorial in the grounds of St Columb's Cathedral.

Image caption Apprentice Boys of Derry pay tribute 100 years after the beginning of the battle

In County Fermanagh, a commemoration service was held at 07:00 BST at Enniskillen Castle, where tributes were paid to all the Royal Inniskilling Fusiliers killed on the first two days of the battle.

On Friday evening, an ecumenical service of reflection will take place in St Macartin's Cathedral in Enniskillen, where a new memorial window will be dedicated in the regimental chapel to all the Inniskillings casualties of World War One.