Foreign Office officials met Cambridge Analytica executives to “better understand” the secrets behind Donald Trump’s presidential victory, the Observer has learned, raising new questions over the extent of links between the government and the controversial data firm.

Officials from London, Washington and New York met Cambridge Analytica representatives in a series of meetings aimed at acquiring insights into the “political environment” that followed Trump’s shock win.

Details of the meetings, revealed in response to a freedom of information request, show the government hoped it would help “build relationships with the Trump campaign and transition team”, and they took place as the Conservative party was desperately seeking contacts within the incoming US administration.

The FoI response also shows the relationship between the Foreign Office (FCO) and the data firm extended to government contracts, with the FCO, under a Labour government, paying more than £400,000 to Strategic Communications Laboratories, the former name of SCL Group, the parent company of Cambridge Analytica, for a project to help tackle extremism.

The contract, worth £402,501, was signed in 2008 to provide research and surveys into public opinion as part of an initiative to help Pakistan deal with extremism and radicalisation issues that could affect the UK.

Ian Blackford, the Scottish National party’s leader in Westminster, said the extent of the relationship between the government, SCL and Cambridge Analytica needed to be made public. “The FCO’s dealings with Cambridge Analytica and the £400,000 given to SCL is an alarming revelation, and raises further questions about the government’s dealings with these companies. How many other departments have had such relations with SCL and CA?” Blackford also revealed that he had forwarded questions to Theresa May about links between the Conservative party and Cambridge Analytica, currently under investigation by the information commissioner over the huge leak of Facebook data, but had not received an answer. The company used personal information harvested from more than 50 million Facebook profiles to target US voters with personalised political advertisements.

So far it has been established that SCL was granted provisional “List X” status by the Ministry of Defence until 2013, giving it access to secret documents. The MoD praised SCL for the training it provided to a psychological operations warfare group with an official stating it would “have no hesitation in inviting SCL to tender for further contracts of this nature”. The meetings between the Foreign Office and Cambridge Analytica appear to have been at a time May’s government was looking to foster relationships with Trump’s team, with the prime minister having been left embarrassed after Nigel Farage became the first British politician to meet the president following his victory in November 2016.

The revelations also follow recent details of a previously undisclosedmeeting in December 2016 between Boris Johnson and Alexander Nix, Cambridge Analytica’s suspended chief executive. Reports documenting the meeting suggest Johnson was not hoping to gain details of the algorithm that helped Trump to victory but improve links with the president.

Blackford has previously raised questions about links between the Tories and SCL’s chairman Julian Wheatland. In April 2015 Wheatland, also chairman of Oxford Conservative Association, tweeted a selfie with the then prime minister David Cameron.