Prime Minister Theresa May had called a snap election nine days earlier.

It brings the total amount the Weirs have donated to the SNP since 2011 to £4.5m.

The couple also donated £3.5m to the pro-independence Yes Scotland campaign ahead of the 2014 referendum.

The latest figures also showed the Weirs loaned the SNP £100,000 during the second quarter of 2017. The party has received £2.1m of loans from the couple since 2015 and has paid back £1.6m.

'Lifelong supporters'

Mr and Mrs Weir have also used their fortune to fund a number of good causes, including buying a 13-year-old boy a prosthetic leg, and have established a charitable trust to help fund health, sport, cultural, recreational and animal welfare projects.

They describe themselves as "lifelong supporters of independence".

The Electoral Commission said the SNP also received £63,000 as a bequest, and a further £23,000 from leading artist Gerard Burns.

Overall, the figures show the party reported £596,000 in donations between April and June of this year.

The figures showed that political parties across the UK were given a record £40.1m in donations ahead of June's general election - with the Conservatives receiving more than all their rivals combined.

Biggest donor

A total of £24.8m was given to the Tories from April to June, more than double Labour's £9.4m. The Lib Dems were given £4.3m.

The biggest donor over the three-month period covering the 2017 general election campaign was the Unite union - which gave £4.1m to Labour - followed by the construction vehicle manufacturer JCB, which donated £1.5m to the Tories.

Former Conservative Party deputy chairman Lord Ashcroft, who said last year that he would start donating to the Tories again having fallen out with former leader David Cameron, gave £500,000.

In Scotland, the Scottish Conservatives were handed a total of £27,000 from four donors in Moray - the key target seat the party ultimately won from the SNP's Angus Robertson.

Scottish Labour received a £20,000 donation from businessman Lord William Haughey, while the Scottish Liberal Democrats received a total of £42,500 - including a £25,000 donation from Stobo Castle Health Spa.