AN Edinburgh advertising firm was responsible for Ukip’s “vile” anti-refugee poster which triggered nearly 40,000 complaints to the police during the EU referendum.

Family Advertising Ltd was the brains behind Breaking Point, which featured a long queue of migrants, and received £100,000 from Ukip for its work during the Brexit campaign. However, the company does not list Ukip on the former client section of its website.

Although the pro-Brexit campaign won the referendum last year, supporters of leaving the European Union were split on strategy and tactics.

Vote Leave, the official campaign, balanced messages on the economy and immigration, while Leave.eu and UKIP focused more on border control.

On June 16, days before the vote, Farage ramped up the rhetoric on immigration with a poster campaign launched outside the EU’s London offices.

The advert featured mostly non-white refugees crossing the Croatia-Slovenia border in 2015 next to the Breaking Point slogan and the words: “The EU has failed us all.”

First Minister Nicola Sturgeon described the intervention as “disgusting”, Unison General Secretary Dave Prentis said the poster was a “blatant attempt to incite racial hatred”, while George Osborne said it was “vile” and had “echoes of literature used in the 1930s”.

Even prominent Leave campaigners distanced themselves from the shock tactics. Michael Gove said he “shuddered” when he saw the image and Boris Johnson said the poster was “not our campaign” and “not my politics”.

Hours after the poster was unveiled, Labour MP Jo Cox was murdered by a right-wing extremist.

Over 39,000 people signed a police complaint petition that described the image as “very much the final straw in a long line of offences”.

However, it can be revealed that the advert was created by a firm based in Ferry Road in the north of Edinburgh.

An “award winning advertising, design and digital” company, Family was formed in 2002 and, according to its April 2016 annual return which is lodged at Companies House, has four shareholders: managing director Ian Wright; creative directors David Isaac and Kevin Bird; and Jill Taylor.

According to the Electoral Commission, Family received four individual payments of £25,000 from Ukip for work carried out during the referendum.

The spending was incurred on June 14 and 15 – the day before Farage unveiled the poster – and the invoice lists the work as “advertising services including media and production”.

In All Out War, a book on the referendum by journalist Tim Shipman, Family is referenced as being the advertising agency “behind” the poster.

Shipman recounted the reaction to the ad: "On Thursday evening Matthew Elliott [a senior Vote Leave figure] phoned Ian Wright of the Family ad agency to ask, 'What else do you have coming out? Do you understand that more ads like this will blow up in your face personally as an ad company, and set us back?' He found Wright 'in complete shock' about Cox's death and the reaction to the advert."

Family is also listed as receiving over £10,000 from Ukip for services ahead of the 2015 General Election and the previous year’s European poll.

In a previous guise key figures in Family worked for advertising firm Yellow M, which famously produced an ad for the Tories depicting Alex Salmond as a Teletubby in 1999.

In the “who we’ve worked with” section of the Family website former clients include the Scottish Government, Visit Scotland, Lloyds TSB, the SNP and the Tories, but neither Ukip nor the Breaking Point advert are mentioned.

A spokesperson for Hope Not Hate, a campaign group against extremism, said: “The Breaking Point poster marked a nadir during the referendum campaign, a sign that Ukip and Nigel Farage were prepared to stoop to the lowest-of-the-low with a poster that blatantly whipped up hatred, showing refugees who weren’t even heading to Europe.

“But then that’s Ukip, and Mr Farage, all over – pumping out xenophobia, pushing the lowest common denominator, then walking away from any responsibility.

“The fact that the firm printing this garbage failed to even acknowledge Ukip as a client speaks volumes.”

Green MSP Ross Greer said: “Future clients deserve to know the type of work the company has embarked upon in the past, especially something which was aimed at whipping up hatred against some of the most desperate and vulnerable people on Earth.”

Family Advertising did not respond to a request for a comment. Ukip declined to comment.