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, as the Orange Order staged the biggest day in its marching calendar.

Tens of thousands of people were involved in the parades that mark the anniversary of the Battle of the Boyne.

The Grand Orange Lodge of Ireland's grand master described Wednesday's Twelfth as the "biggest in a generation".

Edward Stevenson said "unprecedented numbers of people" had attended.

Image copyright Graham Curry Image caption Cookstown hosted a major parade, with several thousand people taking part in the march

Twelfth of July demonstrations are billed as a celebration of Protestant religion, heritage and culture, and marchers were commemorating the Boyne battle's 327th anniversary.

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.

The Police Service of Northern Ireland (PSNI) said Wednesday had been the "most peaceful" Twelfth "for some years".

Image copyright Press Eye Image caption The break before the return leg of the Belfast parade was put to good use by some Orangemen

Three people were arrested on Wednesday, as well as six people on Tuesday night for disorder associated with bonfires.

But the PSNI's Assistant Chief Constable Alan Todd said: "From a policing point of view, events today have pretty much reflected the weather - it's been a good day."

He added that a small number of Eleventh Night bonfires on Tuesday had been "sectarian and racist" and that police are investigating.

Image copyright Graham Curry Image caption Orange Order grand master Edward Stevenson took time to serve ice creams in Cookstown

Mr Stevenson said there had been a "family-friendly and carnival atmosphere" to the parades on Wednesday.

"The wonderful weather exceeded our expectations; as did the tens of thousands of our members, band personnel and supporters, taking part in or lining the routes of 18 venues across the province," he said.

"Such a phenomenal spectacle bears testament to the continuing relevance and wide appeal of Orangeism."

Image copyright PAcemaker Image caption The weather was wonderful for a seaside Twelfth parade through Bangor

While the vast majority of Twelfth parades typically pass without incident, a small number have proved contentious in the past, with some nationalists objecting to public roads being closed to facilitate the marchers.

Tensions around contentious parades have eased, with residents and the Orange Order reaching agreements, and the mood on the streets in many areas this year appears to have been more relaxed.

Orange Order grand secretary Mervyn Gibson said there was "less tension" this year.

Image caption Orangemen listened to the speeches and prayers at the demonstration fields

"We took a deliberate decision last year not to issue statements about parades so that would not increase tensions," he said.

"I believe that paid off and we have built on that this year.

"There are still issues around parades that have to be dealt with, but we don't want to ruin the Twelfth of July for ourselves or anyone else."

Image copyright Alamy Image caption Women watching the parade in Kilrea made sure they stayed well hydrated in the heat

The Ardoyne feeder parade in north Belfast - a flashpoint in previous years - took place on Wednesday morning.

The parade passed peacefully and Sinn Féin MLA Gerry Kelly said there was a "huge change of atmosphere".

"More and more people from Ardoyne and from Twaddell and from residents groups should meet each other and that has always been going on in north Belfast - it is a good day," he added.

Image copyright PAcemaker Image caption Band uniforms were hung up in good order in Kilrea during the break between the parades

The main Orange Order parade passed by St Patrick's Catholic Church in Belfast - another area in which tensions have risen in the previous year - without incident.

Bands abided by the ruling that only a single drum-beat should be played while passing the church.

There was no protest and a more low-key police presence than in previous years.

Image copyright PAcemaker Image caption Senior Belfast Orangemen, including George Chittick (centre), laid a wreath at the city's cenotaph

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.

On 12 July, marching bands from Orange lodges all over Northern Ireland parade through villages, towns and cities before listening to speeches and prayers by senior Orangemen.

Traditionally, the biggest Twelfth gathering is in County Armagh, but a major demonstration was held in each of the six counties in Northern Ireland.

Many smaller towns and villages take turns hosting their neighbouring districts, but Belfast and Ballymena in County Antrim stage a Twelfth parade every year.

Image copyright Press Eye Image caption Orangemen and bands travelled from Scotland to take part in the parades

This year's 18 hosts were:

Richhill, County Armagh

Ballymena, County Antrim

Belfast, County Antrim

Broughshane, County Antrim

Cloughfern, County Antrim

Cloughmills, County Antrim

Cullybackey, County Antrim

Annalong, County Down

Ballynahinch, County Down

Banbridge, County Down

Bangor, County Down

Hillsborough, County Down

Lisbellaw, County Fermanagh

Coleraine, County Londonderry

Kilrea, County Londonderry

Beragh, County Tyrone

Clogher, County Tyrone

Cookstown, County Tyrone

Image caption Orange Order supporters gathered along the lengthy Belfast route to watch the parade

The Orange Order said a "large Scottish contingent" travelled to Belfast to take part in the commemorations.

This year also marks the 500th anniversary of the Protestant reformation.

As a result, some lodge members carried new banners depicting the German theologian Martin Luther.