Every public office-holder may have to swear an oath of allegiance to British values, Sajid Javid, the Communities Secretary, has signalled.

The loyalty pledge would be expected to cover elected officials, civil servants, and council workers.

However Labour frontbenchers attacked the idea and civil service trade unions declined to say if they would encourage their members to agree to the oath.

Mr Javid's proposal comes in response to a report on social cohesion by Dame Louise Casey, which warned some sections of society did not accept British values such as tolerance.

He said he was "drawn" to Dame Louise's recommendation to bring in an oath of allegiance for holders of public office because it was impossible for people to play a "positive role" in public life unless they accepted basic values like democracy and equality.

Mr Javid said: "If we are going to challenge such attitudes, civic and political leaders have to lead by example.

"We can't expect new arrivals to embrace British values if those of us who are already here don't do so ourselves, and such an oath would go a long way to making that happen."

Mr Javid said his aim was not to create a "government-approved one size fits all identity" where everybody listens to the Last Night of the Proms, but "without common building blocks of our society, you'll struggle to play a positive role in British life".