The UK is going through a "political nervous breakdown", a former intelligence chief has told the BBC.
Sir John Sawers said the UK could have a prime minister who does "not have the standing that we have become used to in our top leadership" - a criticism of the two Tory leadership contenders.
The former MI6 boss was also critical of Labour leader Jeremy Corbyn.
Boris Johnson ally Iain Duncan Smith countered Sir John's remarks, saying "democracy may well frighten him".
Sir John's intervention comes as Jeremy Hunt and Mr Johnson battle it out to be the next leader of the Conservative Party.
It also follows an article in the Times newspaper, quoting unnamed senior civil servants, which suggested Mr Corbyn was "too frail" to become prime minister, "physically or mentally".
Speaking on the Today programme, he said: "We are going through a political nervous breakdown here in the UK.
"We have potential prime ministers being elected by the Conservative Party now, [and] in the shape of the leader of the opposition, who do not have the standing that we have become used to in our top leadership.
"Whether people can develop that when they become prime minister, we will have to wait and see, in terms of the candidates for the Conservative leadership."
Sir John's comments come after reports Downing Street tried to withhold sensitive intelligence from Boris Johnson when he was foreign secretary.
It is understood there were concerns about Mr Johnson's ability to keep information confidential.
The Tory leadership frontrunner said the reports were "not true".
UK 'badly divided'
In the surprisingly frank exchange, Sir John said there were concerns in Whitehall about the direction the country is heading.
"I think there is a lot of anxiety as we leave the European Union, we take a huge risk to our international standing, to the strength of the British economy."
He said former prime minister David Cameron had been "unwise" to call the EU referendum in 2016, adding that it had left the country "badly divided" and the UK's standing in the world "severely diminished".
Sir John's comments won't affect leadership race
By Peter Saull, political reporter
Sir John Sawers' views on Brexit are well-known. He's warned in the past that leaving the EU would make the UK less safe.
His intervention will have little impact on the outcome of the Conservative leadership race. Most Tory members are pro-Brexit and many will likely dismiss his opinions as more 'project fear'.
Both leadership contenders say they'd be prepared to take the UK out of the EU, deal or no deal, on Halloween.
However if the views of the former head of MI6 are reflected in the upper echelons of the current civil service, it suggests the new prime minister won't just face resistance in Parliament, but in Whitehall too.
As well as the two would-be Tory leaders, Sir John questioned whether Jeremy Corbyn is of sufficient standing to become PM.
The Labour leader's had his own recent run-in with the civil service, after officials reportedly questioned his health and fitness to lead the country.
No matter who's in power, it seems relations between politicians and civil servants are becoming increasingly strained.
"It is not surprising that the people who have devoted themselves to serving the interests of this country are concerned about the direction in which the country is going."
Before the 2016 referendum Sir John said leaving the EU would make the UK "less safe" because it would be shut out of decisions on the "crucial" issue of data sharing.
Mr Johnson's campaign manager Iain Duncan Smith, a committed Brexiteer, hit back at Sir John's remarks.
"Actually I think he might be going through a political nervous breakdown," he told the Today programme.
"The reality is that the expression of democracy may well frighten him slightly."
Mr Corbyn's office said it would not be commenting on Sir John's remarks.