Media playback is unsupported on your device Media caption Thousands of Orange Order members have taken part in parades across Northern Ireland

Twelfth of July parades have taken place in 18 locations across Northern Ireland.

Tens of thousands attended, marking the anniversary of the Battle of the Boyne.

King William III - the Dutch-born Protestant better known as William of Orange or King Billy - defeated the Catholic King James II in County Meath in July 1690.

On 12 July, marching bands from Orange lodges all over Northern Ireland parade through villages, towns and cities.

They then listen to speeches and prayers by senior Orangemen.

Image copyright Getty Images

The day's longest parade, in Belfast, stretches to six miles (9.5km) - nine districts took part, accompanied by about 60 bands.

As part of it, a wreath-laying ceremony took place at the Cenotaph at Belfast City Hall.

The County Antrim village of Ahoghill hosted one of the largest groups of Lambeg drummers on parade, with the village resounding to the drums' distinctive rattle.

Image copyright Getty Images

The County Armagh parade was the day's largest gathering of Orangemen, with about 5,000 on parade in Tandragee.

The internationally-renowned mezzo-soprano Emma Brown performed at the religious service.

The parade in the south Tyrone village of Augher had Orangemen getting in the mood for the forthcoming Open golf championship being played at Portrush on the north coast.

The "Orange Golf Open" saw members competing in a "nearest the pin" competition.

Image copyright Pacemaker

The weather in Northern Ireland on Friday was dry but at times cloudy, with a few showers mainly in the north.

Brighter spells developed towards the southeast and parts of the east coast.

Temperatures ranged from 15C or 16C on the north coast to 18C or 19C in more sheltered parts of the south.

Image copyright Pacemaker

The Orange Order was formed near Loughgall in County Armagh in 1795, when its founding members pledged their loyalty to the royal family and swore to defend the Protestant faith.

Image copyright Getty Images

Senior Orangeman Edward Stevenson said the parades were a custom that had been handed down for over 200 years.

"Surely there is no other event on these islands that can bring such vast numbers of people onto the streets to enjoy our processions, either by taking part or simply to watch them go by," the grand master of the Grand Orange Lodge of Ireland said.

While the Twelfth is the traditional pinnacle of the marching season, thousands of people have already enjoyed one of the annual pre-Twelfth highlights.

The sun shone brightly at the parade at the seaside village of Rossnowlagh in County Donegal on Saturday.

Orange Order members from both Northern Ireland and the Republic of Ireland took part in the march, which is traditionally held a few days before the main Twelfth of July events.

About 50 lodges from counties Cavan, Leitrim and Monaghan, as well as the host county of Donegal were on parade.

The full list of this year's parades is as follows:

Ahoghill

Augher

Ballymena

Ballymoney

Ballyronan

Belfast

Carnlough

Coleraine

Crossgar

Donemana

Glenavy

Holywood

Kilkeel

Larne

Lisnaskea

Tandragee

Pomeroy

Rathfriland

You can watch BBC Northern Ireland coverage of the parades in Belfast and Coleraine on the BBC iPlayer, and there will be a highlights programme on BBC One Northern Ireland at 22:35.