David Lammy is facing possible legal action over a plan to invite staff from the oil firm Shell and the defence firm BAE Systems to work inside the Foreign, Commonwealth and Development Office.

A pre-action letter seen by the Guardian warns the foreign secretary that the scheme leaves the government open to allegations of a conflict of interest and creates the potential for “improper influence”.

The scheme, which was first mooted by Lammy in March, is supposed to embed FCDO staff in firms to gain commercial experience while inviting private-sector staff to take placements in government.