Andrew Flanagan is to resign as chairman of the Scottish Police Authority.

Mr Flanagan had come under heavy criticism from two Holyrood committees over governance and transparency at the SPA, with MSPs calling for him to go.
Following a meeting with the justice secretary, Mr Flanagan said he would step down to avoid being a distraction to the new 10-year policing strategy.
He also said the "personalised" debate had "impacted on me and my family".
He will stay in post until a successor is appointed.
Justice Secretary Michael Matheson said a review of how the board can be supported "to take informed, transparent decisions" would be carried out.
Holyrood's public audit committee and the justice sub-committee on policing have both criticised Mr Flanagan, with the former raising "very serious concerns" and the latter saying they "do not have confidence" in his leadership.
The police watchdog is also investigating governance at the SPA after a board member quit amid a row over meetings being held behind closed doors and Mr Flanagan's failure to circulate critical correspondence.
Mr Flanagan was appointed chairman of the SPA board in September 2015.
In his resignation letter, he said he had made "significant progress on a number of fronts", including putting together a long-term strategy and recruiting a new chief constable in Phil Gormley.
He said he had "put in place changes to the governance process" following recent criticism, but noted "prolonged and continued debate in the media and in parliament" which was "not helpful to the SPA or policing more generally".
He said he did not want the ongoing debate to "get in the way" of the 10-year policing strategy.
Mr Flanagan said the debate "has become quite personalised and has impacted on me and my family" and added: "This is not something that I wish to endure further."
He said: "I have therefore taken the decision that it would be in the best interests of policing if I were to step down from my role as chair of the SPA."
The running of the board has become a long-running topic of controversy at Holyrood, amid a series of heated committee meetings.
During one hearing earlier this year, SNP MSP Alex Neil told SPA bosses that "it's not the Kremlin you're running".
The criticism stemmed from two main points: Mr Flanagan's failure to circulate a critical letter from the police watchdog, and a row over holding board meetings behind closed doors.
Board member Moi Ali said she had been told by Mr Flanagan that her expressing disagreement about these meetings publicly was a resignation matter, and said her "removal" from the board was "straightforward punishment for speaking out".
She said it was a "really horrendous experience" and that it would not have happened to her if she was a man, claiming Mr Flanagan was "not fit to continue on any public board".
In his resignation letter, Mr Flanagan said he had apologised to Ms Ali and made changes "to ensure there can be no perception of a lack of openness", including a pledge to hold board meetings in public whenever possible.
However, he also wrote about the "limited nature of these matters", and said it was "not the case" that there was a wider lack of transparency at the board.
Announcing Mr Flanagan's resignation, Mr Matheson said a review would be carried out to consider how the board could be supported to take "informed, transparent decisions".
He said: "I am grateful to Andrew Flanagan for his significant contribution to policing, having become chair at a key time for the sector and brought a more strategic focus to the oversight of this key public service.
"However, he has acknowledged that mistakes have been made. He has offered a full and very public apology and made clear changes to transparency and governance in light of the concerns raised.
"I have agreed that he will stand down from his role once a successor is identified and recruited through the public appointments process. This will allow business continuity over this important period."
The review will be jointly led by Nicola Marchant, who was recently appointed deputy chairwoman of the SPA, and Malcolm Burr, chief executive of Comhairle nan Eilean Siar.
It will report back to Mr Matheson in the autumn.
Mr Flanagan's resignation was welcomed by political parties, with Scottish Conservative leader Ruth Davidson saying the move was "needed to allow the correct focus on oversight and delivery".
Labour's justice spokeswoman Claire Baker said it "must only be the start of the complete overhaul that is needed at the top of the SPA". Green MSP John Finnie said Mr Flanagan "should have resigned weeks ago", while Lib Dem Liam McArthur said "serious damage has already been done to the reputation of the organisation".


Comic book maker Marvel has revealed a 15-year-old black girl will be donning the famous armour of Iron Man in an upcoming episode of the series.

Civil War II sees Tony Stark hang up his boots to be replaced by Riri Williams, the company said.
The character is a Chicago-born science genius studying at MIT and made her debut earlier this year.
The news has prompted a huge reaction online, with many welcoming it as a step forward for diversity.
Iron Man writer Brian Michael Bendis told Time he came up with Williams' character after being struck by the "chaos and violence" of Chicago while working in the city.
"And this story of this brilliant, young woman whose life was marred by tragedy that could have easily ended her life, just random street violence, and went off to college was very inspiring to me.
"I thought that was the most modern version of a superhero or superheroine story I had ever heard."
The Iron Man character first appeared in 1963. The series focuses on billionaire weapons inventor Tony Stark.


If chickens ever wanted a safe way to cross the road, then they might have found one.

7 January 2014 Last updated at 16:58 GMT
A company in Oxfordshire have started selling special hi-vis jackets for chickens.
They claim they keep them warm and dry and make it easier for owners to see where they are during the dark winter nights.
The coats even come in two colours - pink and yellow. No yolk!


BBC Scotland is to host a television debate with the leaders of the country's five main political parties, ahead of the UK general election.

Nicola Sturgeon, Ruth Davidson, Kezia Dugdale, Willie Rennie and Patrick Harvie will take part in the 90 minute debate at 19:30 on Sunday 21 May.
The event in Edinburgh will be chaired by Sarah Smith and broadcast on BBC Scotland and on the BBC News Channel.
It is one of a series of programmes planned for the election campaign.
It comes after STV announced it would host a leaders debate with four Scottish leaders on 24 May.
BBC Scotland said it would also run a series of special "Ask the Leader" programmes on BBC One Scotland in the week before the election on 8 June.
Audiences will be invited to ask questions of each of the party leaders in the programmes hosted by political correspondent Glenn Campbell.
From Monday, Reporting Scotland's late evening bulletin will be extended to 30 minutes.
Stephen Jardine and Laura Maciver will host the programme which aims to bring detailed coverage of the latest developments in the story.
BBC Scotland's coverage of the general election campaign will also include:
Gary Smith, BBC Scotland's head of news and current affairs, said: "Coverage of elections is one of the most important things we do at the BBC.  These plans aim to give voters, young and old, all the information and analysis they need, with clarity, accuracy and immediacy.
"We'll be reporting the campaign around the whole country, hearing from the politicians and the public, and giving voters the chance to put their questions to the party leaders," he said.


There are more than 3,300 candidates hoping to win one of the 650 seats in the UK's House of Commons on 8 June.

What do we know about those jockeying for position in the race for election?
Overall, about 30% of candidates are women - up from the previous record of 26% in 2015, although the actual number of women standing is down from 1,036 to 983. However, parties vary.
Labour is putting forward the highest percentage of female candidates of any major party, at 41%. The Greens are on 36%, the SNP on 34%, and the Lib Dems on 29%.
The Conservatives and Plaid Cymru, both of which are led by women, are neck-and-neck towards the back of the pack with 28% of their parliamentary candidates female.*
The party with by far the fewest female candidates is UKIP, on 13%.
Labour also has a higher proportion of women standing in constituencies that the party won in 2015.
But the two biggest parties are fielding very similar proportions of women in seats they lost by less than 10% in 2015.
So if Labour increases its share of the vote in each of these places by five percentage points, it would gain 16 women and 32 men. A similar increase for the Conservatives would give them 18 women and 30 men.
With candidates in all British constituencies (bar one) and seven of the 18 seats in Northern Ireland, the Conservatives are standing in more of the country than any other party. In 2015 they contested 16 Northern Irish seats. Labour and the Lib Dems do not stand in Northern Ireland.
Sorry, your browser cannot display this content.
Enter a postcode or seat name
The Lib Dems have two fewer candidates than Labour, as they are not standing in Brighton Pavilion, which returned the UK's only Green MP in 2015, or in Skipton and Ripon in Yorkshire, reportedly to bolster the chances of the local Green candidate.
Perhaps because they last stood for election only two years ago, just 14 Labour MPs and 12 Conservatives in the 2015-17 Parliament are not standing again.
Compared with previous general elections, these numbers are quite small. Thirty-nine Labour MPs and 38 Conservatives decided not stand for re-election in 2015. The average number of MPs standing down at general elections between 1979 and 2015 is about 90.
Of the 12 Conservatives standing down in 2017, 11 are men, but six of the candidates vying to replace them are women.
For Labour, 11 of the 14 standing down are men, and 10 of the candidates in their former seats are women.
* The Speaker of the House of Commons is an MP and has to stand for re-election as Speaker in their constituency at every general election.
Traditionally the biggest parties in the House of Commons do not stand against the Speaker however some parties, such as UKIP, do.
The current Speaker, John Bercow, is standing for election in Buckingham.
The Speaker is a neutral figure in Parliament, so Mr Bercow is no longer a member of the Conservative Party as he was before his election to the role (by parliament).
However, for the purposes of calculating the number of seats belonging to each party - and calculating those held, gained or lost by each party - Mr Bercow's seat is regarded as being a Conservative constituency as he won it for the party in 1997, 2001 and 2005 before being elected speaker.
For this reason, Mr Bercow is included in the Conservatives' tally of candidates on this page.
The BBC followed the same principle in 2005, when previous Speaker Michael Martin's Glasgow Springburn seat was added to the Labour party's tally of MPs.


Ballinamallard United moved four points clear of bottom club Warrenpoint Town with a 2-0 win at Ferney Park in a game which saw both sides end with 10 men.

Media playback is not supported on this device
Stephen Hughes was sent-off in the first half and Ivan Sproule in the second but goals from Shane McCabe and Ryan Campbell gave the hosts victory.
David Cushley and Michael Ruddy scored as Ballymena United ensured Premiership safety by beating Carrick Rangers 2-0.
Andrew Mitchell was on target twice in Dungannon's 2-1 triumph over Portadown.
The Ports had halted a run of five successive defeats by drawing 0-0 with Ballinamallard last week but the Swifts' success at Shamrock Park on Saturday saw them take 10 points from their four meetings with the mid-Ulster club this season.
Media playback is not supported on this device
Mitchell opened the scoring with a fortuitous 18th-minute goal as his cross from the right sailed over goalkeeper David Miskelly and into the net.
The home side had chances to equalise but Mitchell made the three points secure by hammering the ball home in the 70th minute for his 19th of the season.
Nathaniel Ferris side-footed in a consolation strike from Matthew Parker's left-wing cross five minutes later but Rodney McAree's side remain in the hunt for seventh position.
Bottom club Warrenpoint suffered an early setback in their basement battle as Stephen Hughes was sent-off for handling the ball on the line in the eighth minute.
Jason McCartney's resulting penalty was saved by Jonathan Parr but two minutes after the interval, McCabe gave the Fermanagh team the lead by drilling a 30-yard shot into the net.
Whitey Anderson's outfit were reduced to 10 men on 55 minutes when Ivan Sproule was shown a straight red card for lashing out with a foot after losing possession.
Ryan Campbell added his side's second, stabbing the ball into the roof of the net in the 62nd after getting on the end of an Emmett Friars knockdown.
Media playback is not supported on this device
Seventh-placed Ballymena extended their unbeaten run under new manager David Jeffrey to six matches, and boosted their chances of securing a Europa League play-off spot, by defeating struggling Carrick Rangers at Taylor's Avenue.
Cushley's 35th-minute long-range free-kick took an erratic bounce and sneaked past keeper Brian Neeson for the opener 10 minutes before the break.
Substitute Ruddy made it 2-0 10 minutes from time by firing left-footed past Neeson after Willie Faulkner's initial effort had been saved by the home stopper.
Carrick drop below Ballinamallard into 11th in the Premiership table, just two points ahead of Warrenpoint.


The number of alleged crimes involving Facebook and Twitter has increased nearly eight-fold in four years, according to police figures.

There were 653 people charged in 2012 out of 4,908 offences reported to 29 forces in England, Scotland and Wales.
Police chiefs said the figures demonstrate a new challenge.
Last week, interim guidelines were issued, aimed at reducing the number of charges in England and Wales, after a string of controversial court cases.
The conviction of Paul Chambers in 2010 for joking on Twitter about blowing up Robin Hood Airport in South Yorkshire was widely condemned and eventually quashed.
The latest statistics were released by the police under the Freedom of Information Act.
Fewer Twitter prosecutions likely
In 2008, when the level of social network activity was much lower, there were 556 reports of alleged crimes with 46 people charged.
By this year that figure had risen to 4,908 allegations and 653 charged.
Chief Constable Andy Trotter of the Association of Chief Police Officers said it was important that police prioritised social networking crimes which caused genuine harm.
He said: "We need to accept that people have the right to communicate, even to communicate in an obnoxious or disagreeable way, and there is no desire on the part of the police to get involved in that judgment.
"But equally, there are many offences involving social media such as harassment or genuine threats of violence which cause real harm.
"It is that higher end of offending which forces need to concentrate on."
Police forces were asked to provide the number of crime reports in which either Facebook or Twitter was a key factor, and nearly two-thirds responded.
Offences included those committed on the websites, such as the posting of abusive messages, but also violent attacks committed for real but provoked by these kinds of online postings.
As well as menacing and threatening messages, there were also numerous sexual offences including grooming, complaints of stalking, allegations of racially aggravated conduct and reports of fraud.
Greater Manchester Police charged the highest number of people, at 115. Lancashire Police say they received reports of six threats of murder.
Mr Trotter said some of the offences would have been committed anyway, regardless of the existence of social media.
"We have to respect free speech and cannot have police forces responding simply because of public outcry.
"In many ways, online communities can be self-regulating and good at weeding out unacceptable behaviour. We need to find a way of distinguishing between that type of behaviour and that which requires police intervention."
He welcomed recent guidance from the Crown Prosecution Service (CPS), saying it set a "high threshold" for that intervention and represented a first step towards a better co-ordinated approach.
Director of Public Prosecutions Keir Starmer QC has announced new guidelines on how people who post offensive messages on Facebook and Twitter should be dealt with.
He admitted the CPS made the wrong "judgment call" in the case of Mr Chambers.


Scotland's first podium success in Rio came in the pool, with Stephen Milne, Duncan Scott, Dan Wallace collecting silver in the 4x200m freestyle relay.

The Scottish trio handed over to England's James Guy, who swam a strong final leg to finish behind the USA.
Aberdeen's Robbie Renwick also takes home an Olympic medal having lined up in the semi-final.
"The guys were absolutely amazing and it was a real honour to be swimming with them," Milne told BBC Sport.
"They really smashed it up. We can all be really proud of ourselves."
Milne, from Inverness, was well down the field but Scott and Wallace pulled the team back into contention and Guy overtook the Japanese to finish second in a new British record time of seven minutes, 03.13 seconds.
It was a busy day for Glasgow-born teenager Scott, who also qualified for the final of the 100m freestyle in seventh place after setting a new British record in the heats.
"I was a bit disappointed with how I swam at the Worlds last year, so I felt I had to step it up," said the 19-year-old.
"To come away with an Olympic medal is unreal.
"We were world champions last year, so we thought we had a medal in us, we just didn't know what colour. We're delighted with silver."
Wallace was part of that World Championships success in Kazan, along with Renwick and Guy, but needed a wildcard pick to make it to Brazil following a disappointing first half of the year.
"I was lucky to be on the team," said the 23-year-old from Edinburgh. "I knew I had to step it up and get back to my best. I think I did that and I'm very proud."
Guy, who replaced Renwick for the final, suffered disappointment earlier in the week, going into the individual 200m as world champion but finishing fourth.
Delighted with his contribution as he followed the legendary Michael Phelps home, he was already looking ahead to the Tokyo Games in 2020.
"We're building a great team," he said. "Our oldest guy is 23 so, come Tokyo, we'll be fully grown men going for that title."


Brazilian President Michel Temer has taken millions of dollars in bribes since 2010, according to testimony released by the Supreme Court.

The plea-bargain testimony came from bosses of a giant meat-packing firm.
If confirmed, the accusations could prove devastating for Mr Temer's crisis-hit administration, though he has vowed to prove his innocence.
He is already facing allegations he authorised paying bribes to silence a witness in a huge corruption scandal.
On Thursday he vowed in a TV address to stay on as president.
Joesley Batista, the chairman of the company JBS, alleges that Mr Temer was paid more than $2.5m (9m reais) over the last seven years for electoral campaigning and to pay allies.
Another company director says $4.6m was distributed to Mr Temer's allies in 2014 in the guise of official election campaign donations.
Former Presidents Luis Inacio Lula da Silva and Dilma Rousseff received $50m and $30m respectively to fund political campaigns, the testimony says. Both have denied any accusations against them.
Separately, Prosecutor General Rodrigo Janot wrote in a court filing on Friday that Mr Temer was one of a number of politicians who obstructed investigations into the massive corruption inquiry known as Operation Car Wash.
A year ago, Mr Temer took office after Ms Rousseff's impeachment. Now there are calls for his removal too.
On Thursday Brazilian authorities released an audio recording where Mr Temer appears to be discussing bribes in conversation with Mr Batista.
Mr Temer has said the footage is authentic, taken from a meeting in March, but he has strongly denied wrongdoing.
Mr Temer is already deeply unpopular in Brazil but his centre-right party has been able to govern as part of a coalition.
Opposition parties have been demanding snap elections and his impeachment.
It is the first time Mr Temer has become fully embroiled in Operation Car Wash.
The probe, launched in March 2014, centres on companies that were offered deals with state oil giant Petrobras in exchange for bribes, which were funnelled into politicians' pockets and political party slush funds.
The scandal has engulfed Brazilian politics, with a third of Mr Temer's cabinet under investigation for alleged corruption. Former president Lula is already facing five charges.
The man Mr Temer allegedly condoned the bribery of - Eduardo Cunha -  is in prison for corruption, money laundering and tax evasion.
Both men played a key role in the downfall of Ms Rousseff, who was removed from office accused of illegally manipulating government accounts. She denies all the charges.


A man accused of rape and sexual assault against women he met on a dating website said he had consensual sex with them, a court has heard.

Jason Lawrance is alleged to have raped five women he met on Match.com, attempting to rape a sixth woman and sexually assaulting another.
Derby Crown Court heard the alleged attacks happened between 2011 and 2014.
The 50-year-old, of Liphook, Hampshire, who denies the charges, has begun giving evidence in his trial.
Defence barrister Tracy Ayling QC went through each of the seven complaints from the women who have accused him of the offences.
Mr Lawrance, who was questioned about his relationship with each of them, was also asked each time whether the sex or interaction with them was consensual.
On each occasion he answered: "Yes... That's what Match.com is like, you meet for casual sex".
Mr Lawrance also told Ms Ayling that he re-married in July 2014 - four months before the final rape is alleged to have occurred.
Under cross-examination, prosecutor Shaun Smith QC asked him: "Are they [the women] all telling wicked lies about you?"
"Yes," Mr Lawrance, formerly of Hinckley in Leicestershire, replied.
Mr Smith then asked: "If they are not lying then you are a dangerous rapist, aren't you?"
Mr Lawrance responded: "I have never raped anyone."
The accused claims one woman was embarrassed about having sex with him in his van, and he stopped having sex with another woman when she asked him to.
The prosecution had told the jury, Mr Lawrance used two profiles "keepitstraighttoday" and "straightmanlooking" on the website, but was keen to talk to women offline.
He met seven women from five counties - Derbyshire, Leicestershire, Lincolnshire, Cambridgeshire and Northamptonshire.
The trial continues.


Amir Khan will box on after his devastating defeat by Saul 'Canelo' Alvarez and says a rematch against Danny Garcia is top of his wish list.

The Briton, 29, was knocked out in the sixth round when fighting for Alvarez's WBC middleweight crown in Las Vegas.
Khan, who jumped two weight divisions to fight Alvarez on Saturday, is the mandatory challenger for Garcia's WBC welterweight belt.
"It is the easiest fight to make and it's at my natural weight," said Khan.
"It would be nice to make that fight in the UK but I don't think he'd come. But we have the same advisor in Al Haymon so we'll chat and take it from there.
"I'm in the peak of my career, my stock has definitely risen and I still have a lot left in me. I didn't really take a lot of punishment, just that one big punch."
5 live podcast: 'Difficult for Khan to walk away'
The morning after the fight, Khan was in a surprisingly relaxed mood talking to the assembled media from the comfort of his hotel room.
Even the prospect of climbing into the ring with Garcia again did not seem to faze him, despite the American knocking him out when they met in 2012.
Garcia, who remains unbeaten in 32 professional fights, stepped up to welterweight last year and won the vacant WBC belt with a points victory over Robert Guerrero.
Other potential opponents mentioned were former four-weight world champion Miguel Cotto, who also lost to Alvarez last November, American Timothy Bradley, a former welterweight world champion, and former stable-mate and Philippine legend Manny Pacquiao, who Khan believes will fight again.
Reflecting on his fourth defeat in 35 professional fights, Khan said he did not feel cheated, despite his opponent entering the ring almost 20 pounds heavier.
The match was made at a catchweight of 155lb, five pounds under the normal middleweight limit, but there was no rehydration clause in the contract, meaning the champion could pile on the weight before fight night.
"I'm not going to blame anyone or say they cheated in any way," said Khan. "I knew what I was getting into. I wanted to go in with the best and give the fans a big fight, but I jumped up a bit too high.
"Up until the sixth round everything was going my way. I was leading the fight. But I was hitting him and he wasn't moving - I didn't expect him to be that big.
"And if you make a little mistake against someone like Canelo, he'll make you pay. I've never been hit by a guy that hard before. That shot would have put down a lot of people."
Commenting on the judges' scorecards - two had Alvarez ahead when the end came, one by four rounds to one - Khan suggested the early knockout might have been a blessing.
"In a way I'm glad I got knocked out rather than went 12 rounds, took a lot of punishment and got cheated at the end of it," said Khan. "I'm safe and healthy and can fight another day."


Toddlers struggling with their first words is the biggest single issue affecting child development in Scotland, according to a charity.

Save the Children said more than 7,000 pre-school children have problems with speech and language development.
And babies from poorer families are twice as likely to have delays or difficulties than those from more affluent homes.
It said tackling the issue was key to closing the attainment gap in schools.
The Scottish government held a major education summit on Thursday aimed at improving school standards.
It has made closing the attainment gap between the wealthiest and most deprived pupils its top priority, with the first minister pledging to ensure that every child has the best chance of succeeding in life, regardless of their background.
In its own research, Save the Children said "poverty is damaging too many children's education before they have even set foot in a classroom".
It said children who struggle as youngsters may never catch up with their more affluent peers.
And it said difficulties with speech among toddlers were the "early warning sign" that has so far been overlooked.
The charity called for decisive action in the Scottish government's forthcoming education plan to tackle the problem.
It suggested three actions be included in the plan:
Save the Children's research found children who struggle with speech and language in their early years are often still behind their peers in key literacy skills at age 11.
And it suggested that one in five children in the country growing up in poverty will not be reading well by the time they leave primary school.
The most recent Scottish government figures from 27-30 month child health checks found difficulties in speech, language and communication was the area with most concerns recorded.
A total of 14% of children of the nearly 60,000 surveyed had problems in this area.
Save the Children policy manager Vicky Crichton said while most children in Scotland were developing well, "a significant number of children are showing signs of struggling before they have even reached their third birthday".
She added: "This education plan is a golden opportunity for the government to stop the attainment gap in its tracks and take some truly ambitious steps at the start of a new parliament.
"At the moment, poverty is damaging too many children's education before they have even set foot in a classroom.
"If we're serious about closing the gap we must seize the chance to take action - not just in our schools, but to support children's learning in their first few months and years."
A spokeswoman for the Scottish government agreed that the early years were crucial in child development, and said a report published last year showed vocabulary at age three was improving.
There has also been an increase in parents who look at books or read stories with their 10-month-old child every day or most days, she added.
The spokeswoman said: "We want to build on these positives and continue to improve literacy and numeracy in the early years and encourage parental involvement in their child's education as this is key to raising attainment.
"That's why we are investing in initiatives like PlayTalkRead, Bookbug and Read, Write, Count which all encourage parents to play a part in their child's learning from the start, particularly around reading and language development."


US President Donald Trump has said that trade negotiations with China will be "very difficult" when he meets President Xi Jinping in Mar-a-Lago, Florida, on Thursday.

Trade will be one of two key issues on the agenda, along with North Korea. But what's the problem - and what can Trump do about it?
The problem with the US-China trade relationship is that it is highly unequal and has been for a long time.
In 2016 alone, the US imported $480bn (Â£385bn) of goods and services from China - mostly consumer items like clothing, shoes, televisions, smartphones, laptops and tablets.
Those imports keep prices low for American consumers.
In return, the US sold just $170bn (Â£137bn) worth of exports to China - including sophisticated machinery like aircraft and agricultural products like soybeans.
It also makes money from services, like the education of an estimated 350,000 Chinese students in the US.
Overall, China is the largest source of the US trade deficit - the amount by which the value of its imports exceeds the value of its exports. In 2016 it accounted for about 60% of its overall deficit of $500bn (402bn).
Read more on this story:
President Trump is unhappy with this state of affairs, tweeting in January: "China has been taking out massive amounts of money & wealth from the US in totally one-sided trade."
He sees a link with the loss of manufacturing jobs - and he has a point, because a large trade deficit generally goes hand-in-hand with a smaller manufacturing sector.
This is a problem, because for people without college degrees these jobs tend to be well-paying ones.
During his campaign, Mr Trump spoke often of wanting to bring manufacturing jobs back to the US and, in the first presidential debate, said: "They're using our country as a piggy bank to rebuild China."
After China joined the World Trade Organization in 2001 there was a surge of Chinese imports into the US, something economists called the "China shock".
Between 2000 and 2007, US manufacturing jobs fell sharply, from 16.9 million to 13.6 million. The 2008 financial crisis pushed the number lower, to 11.2 million, although the number has since been fairly stable.
Workers making clothing and electronic goods were among the worst affected.
It is difficult to settle upon an exact figure, but some economists think that 40% of these job losses can be linked to Chinese imports.
However, the influx of cheap goods also created non-manufacturing jobs in the US, because consumers had more money to spend on other things.
That boosted healthcare, entertainment, travel, and leisure. So, think of the trade deficit destroying some jobs and creating others.
So, what can President Trump do about the trade deficit?
Candidate Trump threatened harsh protectionist measures, such as a 45% tariff on Chinese imports, but history shows that protectionism does not reduce trade deficits.
He also threatened to name China a "currency manipulator" and at one point during his campaign went so far as to accuse it of "raping" the US with its trade policy.
For years China intervened to keep its exchange rate low, which kept the price of its goods down and helped increase the US deficit. But more recently its central bank has kept the currency high - making its exports more expensive - and it is in the US's interest to encourage more of this.
The most promising route for President Trump is to negotiate better access to Chinese consumers.
China has many restrictions on imports, for example a 25% tariff on cars. And while the US sells a lot of agricultural products to China, notably soy beans, key markets like beef and pork are highly restricted.
Probably most important for the US is that modern service sectors like finance, social media, telecommunications, health care and transportation are largely closed to imports and foreign investment.
So far there has been little progress, but opening China's markets would offer more choice to its own consumers and would help maintain a stable relationship with the US.
China's economy depends on keeping the trade flowing with its biggest customer.
Will there be a trade war?
Probably not, because protectionist measures would hurt the US economy and the Chinese are counting on it to be practical.
The Chinese Communist Party has an important congress at the end of the year and it will be difficult for Xi to do anything bold before then.
Even afterwards, China is likely to move very gradually on market opening.
Trump was smart to set low expectations for the summit.
David Dollar is a senior fellow in the John L Thornton China Center at the Brookings Institution, a public policy organisation based in Washington DC.
Twitter: @davidrdollar and @BrookingsInst
Get news from the BBC in your inbox, each weekday morning


Nine police officers have been injured during violence in north Belfast.

A 16-year-old girl was also hurt after she was struck by an out-of-control car.
Missiles were thrown on the Woodvale Road and Crumlin Road as police enforced a parade restriction.
The Orange Order was barred from walking along a stretch of the Crumlin Road that separates unionist and nationalist communities on its return from an annual celebration.
Within minutes of the parade reaching police lines, empty bottles, bricks and metal bolts were thrown at police.
The Orange lodges and accompanying bands were returning from a parade to commemorate the victory of the Protestant King William III at the Battle of the Boyne in 1690.
The trouble began at about 19:30 BST on Monday.
But it escalated after a car struck several pedestrians at the nearby Ardoyne shops.
It happened as a crowd of nationalists gathered on the Crumlin Road.
The vehicle trapped the girl underneath and was lifted off by police and members of the public.
She was treated by paramedics at the scene and taken to hospital.
A man was taken away by police for his own safety.
Police said two officers were hurt as they dealt with that incident.
Fr Gary Donegan, of Holy Cross Catholic Church, who was at the scene, told the BBC that a driver "panicked" and drove into a crowd, injuring three people.
He said that a girl had been trapped under the car and suffered head and neck injuries.
"The car hit a number of pedestrians and, in the case of this 16 year old, the car went right over the top of her.
"PSNI officers and local residents managed to lift the car off her. There were graphic scenes of seeing her feet sticking out from underneath the car.
"You could actually see the marks of the vehicle on the back of her jeans. She was very distressed."
Sinn FÃ©in MLA Gerry Kelly said the girl had been injured but it was not life-threatening. He said the teenager was trapped under the vehicle after it mounted the kerb. She was later freed by police officers and people in the area, before being taken to hospital.
Mr Kelly appealed for calm.
The violence followed a day of largely peaceful 12 July loyal order parades across Northern Ireland.
First Minister Peter Robinson condemned the violence.
"The PSNI is tasked with upholding the rule of law and it is vital that those involved in such riotous activity cease and are held accountable.  They do a massive disservice to the wider cause they claim to support," the DUP leader said.
"My thoughts and prayers are with all those who have been injured whilst serving the public, as well as the young girl who has been injured in a vehicle collision."
Northern Ireland Secretary, Theresa Villiers, described the attacks on police as "disgraceful".
"Those responsible do nothing to further the cause they claim to promote," she said. "They damage Northern Ireland and wreck a day which should be about respectful celebration of cultural tradition."
North Belfast MP Nigel Dodds, DUP, said there was a "severe problem in relation to community relations and respect for law and order".
"The way forward is to recognise the failures of the past cannot be repeated and a new way forward for parading and protesting is badly needed," he said.
The Orange Order also condemned those engaging in violence and issued an appeal for calm.
"Those involved in violence should desist," a Grand Orange Lodge of Ireland spokesman said.
"It is not only counterproductive but also plain wrong.
"Such actions are only strengthening the hand of those who wish to further curtail our parades."
Shadow Secretary of State for Northern Ireland, Ivan Lewis, said the police and members of the public, had "endured unacceptable levels of violence and disorder".


As Britain agonises over whether to stay in or leave the EU, many UK voters are looking to Switzerland's example to help them make up their minds.

The Swiss voted in December 1992 not to join the European Economic Area. At the time, joining the EEA would have been a first step towards full EU membership.
Instead, Switzerland, which sells over 50% of its exports to the EU, agreed more than 120 bilateral agreements with Brussels designed to secure Swiss access to Europe's markets.
It has, political analyst Dieter Freiburghaus says, worked quite well.
"Switzerland was only interested in the economic aspect of European integration, and that we got: we got access to the internal market. So our economy had a lot of gains. We have the cake and we eat itâ€¦ at the moment."
EU referendum live reporting- latest updates
Switzerland - BBC country profile
Is the UK safer in or out?
EU referendum - all you need to know
The Swiss economy has been ranked the world's most competitive.
Unemployment, while rising, is low by European standards, and being outside the EU has allowed Switzerland to clinch its own personal trade deal with China, something EU members cannot do individually.
But Swiss business leaders are quick to caution against seeing Switzerland's example, which took many long years of haggling, as ideal.
"Sometimes you get a good piece of a good agreement, sometimes you don't get it at all," says Jan Atteslander, European Director of the Swiss Business Federation, EconomieSuisse. "It has advantages and disadvantages economically. You can't have it all."
Swiss businesses, while having access to Europe's markets, are not on a level playing field with their EU counterparts.
Precision engineering company Rueger sells 50% of its products to the EU.
"Compare just the logistic costs," explains managing director Bernard Rueger. "It's simple in Europe, in terms of administration, in terms of tax, they are working in the same unique market, whereas here in Switzerland we have to export our goods."
"And it's probably 4-6% more costly exporting from Switzerland."
Add to that the overvaluation of the Swiss franc and Switzerland's products start to become very expensive. That is why Rueger now has a plant in the Netherlands, offering jobs that might otherwise have stayed in Switzerland.
And it is why the managing director, from a purely business standpoint, has some blunt advice for his British colleagues. "My first advice is to vote to stay in," he says. "It's a crucial market."
If the vote goes the other way, Mr Rueger believes, many British firms will have "no choice" but to move some production capacity inside the European Union proper.
While Switzerland may have wanted only economic union with Europe, political ties have become ever closer over the years.
A central plank of Brussels' negotiating tactic with the Swiss was to insist that they could not "cherry-pick" the parts of the EU they thought would be most advantageous, such as its trade area.
Switzerland has signed up to free movement of people, with all the benefits that implies for workers and their families from the EU, and to Schengen open borders, all without ever being at the negotiating table at which those policies were drafted.
Switzerland contributes billions of dollars to EU projects on research, education, culture and security. The Swiss even paid 1.3bn Swiss francs (â‚¬1.18bn; Â£910m) to the EU enlargement fund, designed to support new members from Eastern Europe.
But the adoption of all that policy caused political problems. Two years ago Swiss voters, concerned about rising immigration, narrowly supported a proposal to limit the number of workers coming in from the EU, effectively abandoning Switzerland's commitment to free movement of people.
Brussels made good on its no-cherry-picking policy and retaliated swiftly.
Swiss universities were blocked from European research projects. Swiss students were denied access to the Erasmus exchange programme.
"Being kicked out of that scheme represents a real handicap," says Andreas Mortensen, Vice-Provost of Switzerland's prestigious Federal Institute of Technology in Lausanne.
"As a researcher, you would certainly rather want to remain within the EU. The benefits from being part of the EU research community are the intellectual oomph and the opportunities for collaboration."
Student Zilia Schwartz, who had just been accepted on an Erasmus exchange to the Netherlands, was affected too.
"I was about to go on my exchange and then there was this vote, and it was like: 'Oh maybe you can't go'," she said.
In the end the Swiss government solved Zilia Schwartz's problem by throwing money at it, paying each European university separately to admit Swiss students.
Switzerland's hard-won bilateral deals are now in danger of unravelling over the question of its participation in free movement of people.
The Swiss government has not yet introduced any restrictions on EU workers. It is still hoping to find a way to do so that won't bring further punishment from Brussels.
But the signs are not good: as well as the stalled participation in education and research projects, key trade agreements on electricity and financial services (a much longed-for prize for the Swiss) have been frozen.
There will be no deal for Switzerland, the EU has signalled, until after the UK's in-out referendum.
If Brussels is reluctant to offer a member like the UK concessions on social benefits for EU migrants, how likely is it to allow a non-member to restrict EU immigration altogether?
"Everyone talks about Brexit but no-one has said what will happen afterwards," warns Dieter Freiburghaus.
"What about the treaties with the EU? Switzerland has 120 agreements. Will Britain begin, the day after, to negotiate 120 agreements? Will it join the European Economic Area? It is so unclear."
The message from Switzerland appears to be that survival outside the EU is doable, but certainly not easy.


Firefighters have issued a safety warning after Christmas tree lights set on fire after being left on during the night.

Mid and West Wales Fire and Rescue Service were called to Charles Street, Milford Haven at 00:38 GMT on Sunday.
No one was hurt after the occupants were alerted by a smoke alarm to the fire in their front room.
Steve Davies, deputy head of community safety, said the incident could have been much worse.
He said: "We all love Christmas lights, but we often forget that Christmas lights are used far less than everyday lights, and so require more care.
"When arranging your lights, please follow the manufacturer's instructions, check that your Christmas lights carry the British Standard sign and replace any bulbs that blow.
"These light bulbs can burn through materials such as paper of fabrics so please do not attach decorations to lights or heaters."
"Make this a Christmas to remember for the right reasons, always ensure that you switch all Christmas lights off and unplug them before leaving the house or going to bed."


Tube drivers will stage three 24-hour strikes over a "breakdown in industrial relations", union bosses have warned.

About 400 drivers on the Piccadilly Line will walk out before Easter on 23 March, then on the 19 and 21 April.
The Rail, Maritime and Transport (RMT) union said 85% of the members polled voted for strike action.
The London Underground line carries 600,000 passengers a day on average and is the only Tube service to Heathrow airport.
The union said several issues had led to the call for strike action, including concerns over the "ageing Piccadilly Line fleet", which have "left drivers in a vulnerable position".
The Piccadilly Line has some of the oldest trains on the network known as "1973 stock".
RMT general secretary Mick Cash said: "The wholesale abuse of procedures and agreements by management on the Piccadilly Line is rife and amounts to the development of a campaign of bullying, harassment and intimidation that the union will not allow to continue."
Transport for London urged the union to continue discussions with the operator.
Operations director Pat Hansberry said: "It is disappointing that the RMT is once again threatening unnecessary strike action without seeking to resolve these local issues with us first."


Land Rover Defenders are "being stolen to order" with reported thefts rising in both rural and urban parts of Avon and Somerset, police have said.

The region's rural crime team said the end of production of Defenders in January could be one of the reasons why thieves are targeting them.
It said 25 Defenders were stolen "force-wide" last year with a "definite increase" in the past two months.
Farming insurance firm NFU Mutual said it had seen a recent rise in claims.
PC Katie Drabble, from Avon and Somerset police, said: "Since the production [of Defenders] finished in January, we've definitely seen an increase in theft.
"Not just for the parts but for the actual vehicle, because they're stolen to order and then exported out of the country.
"Don't leave the keys in. It sounds ridiculous but people do, especially on farms because different people are using the vehicle - use a key safe."
She added it was "important to highlight" that it was not just farms being targeted, with thefts also happening in the centres of Bath and Bristol.
Tim Price, from NFU Mutual, said the company had "certainly" seen an increase in claims for Defenders.
He said: "NFU Mutual insures three quarters of the farmers in Somerset and many other country people, so we probably cover the majority of the Land Rover Defenders that are on Somerset's roads.
"Like the police, we're working hard to get the message out to people to increase security measures.
"We work very closely with the police and we do feel that, unless people take more precautions, it is going to be a growing crime.
"We want to do everything to keep Somerset's Land Rovers safe."


Two Australian businessmen backed by a university research project have launched what they claim to be the first shark-repellent wetsuits.

Their blue and white Elude suit is said to make divers much less visible to sharks by drawing on research into the way they see their prey.
A separate design - the Diverter - has black and white stripes to signal that a surfer is not good to eat.
The project follows a wave of shark attacks in Western Australia.
Sharks are common in Australian waters but fatal attacks are rare - on average, one person is killed by a shark in a year.
But five people were killed in the year to July 2012.
The designers say they used new scientific insights into sharks' perceptions of light and colour blindness to come up with a product which could camouflage a diver or snorkeler in the water.
One of the entrepreneurs, Craig Anderson, told the AFP news agency that the Elude suit created "confusion" for the shark's visual systems.
The University of Western Australia researcher, Shaun Collin, said the black-and-white design would ward sharks away from surfers.
"Many animals are repelled by a striped pattern which indicates the potential prey is unsafe to eat."
Western Australia's government funded tests with dummies and tiger sharks off the state's coast.
Tiger sharks were observed swimming past dummies wearing the striped pattern wetsuits, whereas those clad in traditional black wetsuits were attacked.
Further testing will be done off southern Australia and South Africa when summer begins in the southern hemisphere.
Mr Anderson said there was "substantial" demand across the world for technologies to repel sharks.
"Everyone's looking for a solution, everyone's nervous about going in the water around the world now," he added.
But Ali Hood, conservation director for the Shark Trust in the UK, told the BBC: "To suggest that 'Everyone's nervous of entering the water' is rather strong."
She said there had been a growth in the water sports market and more people than ever were entering the water all year round, but there was no corresponding increase in shark encounters or fatalities.
Ms Hood said the Shark Trust welcomed all progress with regards to the development of non-fatal shark repellents or exclusion devices.
But, she added: "Sadly, a great number of the fatalities attributed to sharks occur in avoidable circumstances: swimmers entering the water where shark warnings have been given; surfing at dawn or dusk on reefs known to be frequented by sharks; and spear fishermen carrying their catch close to their bodies."


Conditions at an Australian asylum camp on the Pacific territory of Nauru are "cruel" and "degrading", Amnesty International says.

Representatives of the rights group spent three days at the offshore processing camp, now home to 386 men.
Amnesty found tents crowded, hot and wet, with no privacy. Uncertainty over detention length had also led to "dire" mental health, it said.
In response, officials said amenities and support services were available.
Australia reintroduced offshore processing in September in a bid to deter asylum seekers from making the dangerous journey to Australia by boat. In recent months the number of arrivals has climbed.
Another Australian processing centre opened earlier this week on Manus Island in Papua New Guinea.
Both the ruling Labor party and the opposition have suggested that asylum seekers may have to spend up to five years in offshore camps while their claims are processed.
In Nauru, Amnesty found in its report, the detainees were living in a camp 150m by 100m, in 16-man or 5-man tents that contained closely-packed stretcher beds and plastic containers for clothes.
Temperatures reached 40 degrees in the compound, with high humidity, and there was little shade, as well as no privacy.
When the delegation was there, part of the camp flooded due to monsoon rains, and both tents and bedding were wet.
A lack of information about a timeline for processing their asylum claims was exacerbating detainees' anguish.
"This is like severe punishment for criminals. In Australia, I think criminals are treated better than this. Even a criminal knows how many years they will be in jail but we have no idea," Amnesty quoted one of the detainees as saying.
Nine men were on hunger strike, including one who had not eaten for more than 40 days, it said.
Dr Graham Thom of Amnesty said there was clear evidence that the camp had been "erected in haste, with no consideration for the individuals languishing in such squalid conditions".
The rights of the detainees, Amnesty said, were being breached by both the Australian and Nauru governments. Transfers to the camp should stop immediately and the centre should be closed, it said.
Responding to the report, a government spokesman said it was "no surprise" that Amnesty did not agree with the processing centre, saying the groups "opposition to offshore processing and indeed immigration detention was established long before this facility was".
Food and water were available at all times, as was access to medical care and mental health support services when required, the spokesman said. Recreational activities were also available.
On processing detainees' claims, Australia was working closely with the Nauru government and expected to begin assessments early next year, the spokesman said.
The government decided to re-establish offshore processing camps in August, after ending the policy - known as the Pacific Solution - in 2008.
The move, recommended by an expert panel, came in response to a sharp rise in the number of asylum seekers arriving by boat.


Net migration to the UK fell by a third in the year ending June 2012, compared with the previous 12 months, the latest immigration figures show.

The Office for National Statistics said 163,000 more people came to live in the UK for 12 months or more than had left, compared with 247,000 the year before.
The ONS said this was driven by a drop in immigration, and study remained the most common reason to come to the UK.
Ministers want to cut net migration to the "tens of thousands" by 2015.
The ONS said the figure of 515,000 people who had immigrated to the UK in the year ending June 2012 was "significantly lower" than the 589,000 who had come in the previous year.
Its figures also showed:
By Dominic CascianiHome affairs correspondent
Immigration is pushed and pulled by a myriad of factors, from family life to global economics. But, ultimately, the politics of migration in the UK, whether you agree or not, comes down to the numbers.
And so ministers will point to these figures as evidence that their policies of tackling immigration abuse and some categories of students are biting. They're certainly closer to their net migration target than they had expected to be.
However, critics will ask whether part of the fall relates to whether the UK remains attractive.
The UK cannot turn away EU workers - but there's been a drop in the arrival of those industrious Eastern Europeans whom business bosses love. Statisticians think some of those people may now be heading to Germany instead.
Secondly, there's been a slight rise in emigration as more Britons and people from Commonwealth nations find jobs abroad.
Immigration minister Mark Harper said: "Our tough reforms are having an impact in all the right places - we have tightened the routes where abuse was rife and overall numbers are down as a result.
"We will continue to work hard to bring net migration down from the hundreds of thousands to the tens of thousands by the end of this Parliament and to create a selective immigration system that works in our national interest."
But Chris Bryant, shadow immigration minister, said: "Net migration is falling but public concern is rising.
"These figures demonstrate that the government is not focusing on the kind of immigration that worries people the most. Half the drop is down to students, while 30% of the net migration reduction is down to fewer British people.
"Worryingly, the government appear to be taking some students away from full visas with proper checks and giving them student visitor visas instead, yet we know these visas have fewer checks and are more open to abuse. This is an own goal."
UKIP immigration spokesman Gerard Batten said "These figures hardly reduce immigration to the 'tens of thousands' promised by the government. They reflect the tightening up of the student visa system which was, and still is, open to flagrant abuse.
"These reductions in the net figure represent a temporary dip since the government has no long-term plan to control EU migration."
Dr Scott Blinder, of Oxford University's Migration Observatory, predicted that the government could find it "even more challenging" from now on to reach its target.
"Of the decline of 92,000 in net migration from its recent peak, a bit more than half come from changes in non-EU migration, where the government's policy changes may be having an impact.
"Making the further cuts in non-EU net migration needed to reach the target... could still be a difficult task, as these figures are greater than the total remaining reductions projected in the government's impact assessments for its policy changes."
Pressure group Migration Watch UK welcomed the overall drop in net migration. Its chairman Andrew Green said it was "evidence that the government's policies are starting to take effect".
"The universities have been wrong to claim that their sector was suffering from the restrictions designed to tackle bogus college students," he added.
But the Institute for Public Policy Research think tank said much of the fall in immigration had been the result of a fall in the number of people coming to study in the UK - which was down from 239,000 to 197,000 - which would only have a short-term effect on the net migration figures.
Sarah Mulley of the IPPR think tank said: "Because most students stay in the UK only for a short time, reduced immigration now will mean reduced emigration in the future, which by 2015 could partially reverse the falls we are seeing today."
The previous set of figures - to the end of March 2012 - showed net migration was 183,000.


A local authority has approved "ambitious" plans to sell off £28m worth of its properties and land to help raise funds.

Some of Leicestershire County Council's assets, which total around £360m, will be sold over the next four years.
Last year, all the authority's care homes and Quorn Hall, which had been used as an outdoor education centre, were sold for almost £7m.
Bosses said the plans were "ambitious and challenging" but deliverable.
The council's Corporate Asset Management Plan aims to help make savings of £82m by 2019 and to make energy savings by improving buildings.
Liz Carter, strategic property manager, said: "It is a very ambitious list [of assets]. It is very challenging but I'm putting it forward because I believe we can deliver it."
Councillor Blake Pain, cabinet member for property, said the plan showed how land and buildings could be used "more effectively to generate capital receipts, save money and provide better facilities".
He said other proposals included:
Leader of the opposition Labour group, Robert Sharp, said there was a risk of assets being sold below their market rate and those of real value to the community being sold.
"We will scrutinise all such proposals to check that residents are not being short changed," he said.
The council said all proceeds would be re-invested in the council's capital programme which pays for items such as roads and buildings.


BBC Sport's football expert Mark Lawrenson is pitting his wits against a different guest each week this season.

Lawro's opponents for this weekend's Premier League fixtures are actors Idris Elba and Richard Madden, who feature in new film 'Bastille Day'.
Elba, also the star of TV shows Luther and The Wire, took the lead in the predictions because former Game of Thrones actor Madden says he is "more of a rugby man".
Media playback is not supported on this device
London-born Elba is an Arsenal fan who says following the Gunners this season has been like watching a snooker player who cannot put away a pot.
"Some seasons are like pool games, when they are slotting them away," he told BBC Sport. "But others are like snooker matches, where you are going 'please, just put one in'.
"I think this has been a snooker season for us. It has just been very tough."
A correct result (picking a win, draw or defeat) is worth 10 points. The exact score earns 40 points.
Last week, Lawro got seven correct results from 10 matches, with two perfect scores for a total of 130 points.
He beat Grand National jockey Leighton Aspell, who got five results correct, with one perfect score, for a total of 80 points.
Make your own predictions now, compare them to Lawro and other fans and try to take your team to the top of the leaderboard by playing the BBC Sport Predictor game.
All kick-offs 15:00 BST unless otherwise stated
Lawro's prediction: 1-1
Idris Elba's prediction: 1-2
Match report
Lawro's prediction: 2-1
Idris Elba's prediction: 2-3
Match report
Lawro's prediction: 3-0
Idris Elba's prediction: 3-1
Match report
Lawro's prediction: 2-1
Idris Elba's prediction: 2-1
Match report
Lawro's prediction: 2-1
Idris Elba's prediction: 1-1
Match report
Lawro's prediction: 1-2
Idris Elba's prediction: 1-2
Match report
Lawro's prediction: 1-1
Idris Elba's prediction: 0-2
Match report
Lawro's prediction: 2-1
Idris Elba's prediction: "Leicester are on fire at the moment. I am so happy for them, the underdogs. I am an underdog too, so I love it." 2-0
Match report
Lawro's prediction: 2-0
Idris Elba's prediction: "Should Wenger stay or go? That is such a tough question. I think, considering his record, he stays. We see a different Arsenal if he goes. Yes, we might see an Arsenal that wins the Premier League but we do see a different team and I would be sad to see the back of him if I am honest. As for Palace, we will do them 4-0."
Match report
Stoke lost heavily at Anfield last week after drawing 2-2 with Swansea, but there is no way their manager Mark Hughes will just let things fizzle out after another really good season.
I still fancy Tottenham to win here, though. I was really impressed with them against Manchester United, not simply the fact they won 3-0 but because United looked bright and sharp early on yet never looked like scoring.
Media playback is not supported on this device
It was hard to see Spurs getting a grip on the game, so they were relying on their defence, but then it just happened for them at the other end.
That is why they are such a good side - they have players who can turn games around in a second.
Any other year, we would be saying they are the best team in the league, but Leicester look like beating them to the title.
Analysis: Why Tottenham title bid is just the start
Lawro's prediction: 0-2
Idris Elba's prediction: "How would I feel if Tottenham win the title? I would be physically ill. Literally, I would be throwing up. Against Stoke, Spurs will have them, but I think it will be a good game." 3-2
Match preview
Lawro was speaking to BBC Sport's Chris Bevan.
*Does not include score for postponed games
Lawro's best score: 160 points (week 19 v Guy Mowbray)
Lawro's worst score: 20 points (week one v Graeme Swann & week 23 v Ice Cube and Kevin Hart)


Lloyds Banking Group, owner of HBOS, is going to review the cases of customers affected by a fraud involving two ex-employees, who were jailed last week.

Six people, including the former HBOS bankers, were found guilty of a scam involving fraudulent loans.
The bank has been under pressure to pay compensation after it was accused of reacting too slowly to complaints from victims of the scheme.
The fraud took place before Lloyds Banking Group took ownership of HBOS.
"Customer cases will be considered afresh in light of all relevant evidence including new evidence that emerged during the trial," said a Lloyds statement.
"Since the investigation began in 2010, it was important that the group did not do or say anything that could subsequently prejudice the trial.
"The group deeply regrets that the criminal actions have caused such distress for a number of HBOS business customers."
Former HBOS manager found guilty of corruption and fraud
HBOS: A highly unusual fraud case
HBOS fraud: "They caused me to give birth early"
Ex-HBOS banker "sold his soul for swag"
The statement explained that Lloyds would appoint an independent third party as part of the review and would agree the individual outcomes with it.
It added: "Lloyds Banking Group will contact all those customers they have identified as potentially affected by the criminal activities and provide redress if appropriate.
"Whilst this should result in all these customers being contacted proactively, any customer who believes they may have been affected can also raise concerns direct with LBG."
Some of the victims lost their companies, livelihoods and even their homes because of the scam.
Paul and Nikki Turner, from Cambridge, tried to report what was going on after their publishing company, Zenith, was run into the ground by the scammers.
They said they have had to fight hard for 10 years to have the fraud recognised.
Sources close to the investigation say the total value of the fraud may be close to Â£1bn.
"A number of us have already started actions against the bank and that will continue," said Joanne Dove, a member of HBOS Reading Action Group, who are former customers of the bank. Ms Dove lost millions through her nappy service firm as a result of the fraud.
"It would have been far better for the bank to admit a fraud had occurred, accept responsibility and then negotiate with the victims rather than appoint a needless third party consultant which will incur more expense, borne by LBG's shareholders and will possibly lead to extensive delays in agreeing compensation."


A row over the intervention of business leaders and banks in the Scottish independence debate has intensified on the final weekend of campaigning.

First Minister Alex Salmond said the Scots would not be "bullied" by oil companies, supermarkets or London.
It comes as chief economist at Deutsche Bank David Folkerts-Landau said voters and politicians had failed to grasp the negative consequences of independence.
Meanwhile, a Guardian/ICM poll put the "No" vote at 51%, with "Yes" on 49%.
On Thursday evening a YouGov opinion poll was published suggesting that the "No" campaign was leading by 52% to 48%, once undecided voters were excluded.
The Yes Scotland campaign claims that over the weekend there will be more than 35,000 volunteers at 473 registered street stalls trying to persuade people to vote for independence.
They say that 2.6 million "Yes" leaflets will be delivered in 48 hours.
Scotland's Deputy First Minister, Nicola Sturgeon, said: "The 'Yes' campaign has been carried along by a flourishing of self-confidence among people in Scotland.
"That momentum is still growing and will soon become unstoppable, as people reject the Downing Street-orchestrated campaign to talk Scotland down.
"Today thousands of Yes supporters from communities across Scotland will be running the biggest campaign day of action Scotland's ever seen."
The bosses of three retail groups have put their names to a letter in the Daily Record, in which they claimed their costs would rise in an independent Scotland and they would have to take "the difficult decision" whether or not to pass those on to consumers.
The letter, signed by the heads of Marks and Spencer, B&Q owner Kingfisher and Timpsons, read: "Within our group there is first-hand experience of trading across national borders - in France, Ireland and across the world.
"Our experience is that it always leads to more red tape and higher costs."
However Tim Martin, the boss of pub chain JD Wetherspoon, said on Friday: "Scotland could do very well on its own".
Ahead of the final weekend of the campaign, Mr Salmond has renewed his complaint that the Treasury broke ministerial rules when it confirmed to journalists that the Royal Bank of Scotland (RBS) planned to relocate its registered headquarters from Edinburgh to London in the event of a "Yes" vote.
He has written to Sir Jeremy Heywood, the UK's most senior civil servant, asking "which minister or official authorised the release [of the information about RBS]" and "at what time the information was released".
BBC economics editor Robert Peston said he had been told the Treasury briefed journalists about the plans to potentially move to London before the board of RBS had formally approved the decision.
Our correspondent said that when journalists were emailed on Wednesday evening by the Treasury, to tell them about the relocation plans of RBS and Lloyds, RBS's board "was still meeting" to decide whether to tell shareholders the following morning.
He said sources had told him they did not believe it was a case of market abuse, or the illegal release of price sensitive information, because the UK and US stock markets were shut at the time of the briefing.
Police Scotland have confirmed they have received a complaint from RBS shareholder Peter de Vink, a supporter of independence for Scotland, alleging the UK government leaked market-sensitive information about the bank.
Mr de Vink said Downing Street "has been behaving like a dictator in a banana republic," adding that the UK government's behaviour was "a total affront to democracy".
He said he had written to Scotland's senior prosecutor, the Lord Advocate as well as Police Scotland, the City of London Police and the Financial Conduct Authority.
And Deutsche Bank's Mr Folkerts-Landau has said it was "incomprehensible" that Scotland was even contemplating withdrawal from the UK.
The chief economist compared a potential "Yes" vote to the mistakes which led to the Great Depression of the 1930s.
"A 'Yes' vote for Scottish independence on Thursday would go down in history as a political and economic mistake as large as Winston Churchill's decision in 1925 to return the pound to the Gold Standard or the failure of the Federal Reserve to provide sufficient liquidity to the US banking system, which we now know brought on the Great Depression in the US," he said.
Deutsche Bank's global strategist Bilal Hafeez also said independence would bring a depression to Scotland and possibly the rest of the UK.
He told Radio 4's Today it was "very, very difficult" to make a case for Scotland flourishing as an independent country.
"Essentially the issue is that if Scotland was to break away from the Union, but retain the pound... Scotland would lose control of the pound, it would have to accept whatever monetary policy was set for the rest of the UK. It would not have control of the money supply in the country.
"More importantly, it wouldn't have a central bank that can issue pounds - that power would reside with the bank of England."
However, the Scottish government accused Mr Folkerts-Landau of failing to take into account Scotland's "strong fiscal position".
Scottish Finance Secretary John Swinney said Scotland would start life as an independent nation "from stronger economic foundations than any other nation in history".
Speaking in Perth on Friday evening, First Minister Alex Salmond said: "The people of Scotland are not going to be bullied by big oil. We're not going to be bullied by big supermarkets. We're not going to be bullied by big London government.
"We're not going to be bullied out of our opportunity - our once in a lifetime opportunity - to create a more prosperous country and a fairer society."
Across the final weekend of campaigning, Mr Salmond is due to continue his helicopter tour of the country, including stops in Oban, Dumfries, Ayr and Glasgow.
Former Prime Minister Gordon Brown will be campaigning for Better Together, as will Labour MP Jim Murphy, who will complete his 100-town tour of Scotland.
Thousands of Orange Order supporters were in Edinburgh for a rally on behalf of the United Kingdom.
Ahead of the march, Henry Dunbar, grand master of the Orange Order in Scotland, said: "The 'No' campaign has been criticised for not showing enough passion for the Union - well look out, here comes some passion.
"We are the Orangemen and women of Scotland and we are passionate about our Queen and country."
On Thursday voters in Scotland will go to the polls to answer the Yes/No question: "Should Scotland be an independent country?"


Indian authorities are investigating claims that 70 girls aged about 10 were stripped naked in a residential school to "check for menstrual blood".

Students of Kasturba Gandhi Girls Residential School, in the northern state of Uttar Pradesh, claim a female warden forced them to strip after finding blood on a bathroom door.
The warden was suspended after parents complained.
She initially defended her actions but later denied the entire incident.
Surekha Tomar had told reporters that after finding blood on the bathroom door, she tried to find out if one of the children had begun menstruating for the first time.
"I thought a 10-year-old might feel scared or ashamed to tell me if they had started their period so I wanted to find out. I am like their guardian. If I ask them something like this or check them, I have not committed a crime," she told Indian television channels.
Later however, she said that the entire incident was engineered by other teachers who wanted her to lose her job.
Many of the children have alleged that they were forced into taking off their clothes for the inspection.
"There was some blood on the bathroom door. Ma'am wanted to investigate. She asked us to strip. She wanted to check if one of us had started our period.
"She told two of our schoolmates to check and said if you don't tell us I will beat you. She said if you don't have shame I don't either," one student told reporters.
One parent told reporters that he had found out about the incident in the newspapers.
"I called my girl and she said it is true, and that she was also asked to strip. I left my job to come and get her. The warden should be jailed," he said.
Other teachers in the school also condemned the incident, and said that if proven, strict action needed to be taken.


A senior police officer says he is concerned at media reports that a murder was a "hate crime" before a motive for the fatal attack has been established.

Arkadiusz Jozwik, 39, suffered head injuries in an unprovoked attack in Harlow, on Saturday night. He died on Monday evening.
Six teenagers have been arrested on suspicion of killing Mr Jozwik.
On Wednesday night a vigil was held in the town.
LIVE: For more on this and other Essex stories
Det Ch Insp Martin Pasmore, of Essex Police, said: "It's concerning that the widespread media are reporting this as a hate crime, when in fact that is no more than one line of inquiry in a number of inquiries, which we are delving into to try and establish the truth, to establish that sequence of events that led to Mr Jozwik's tragic death."
Poland's deputy prime minister Mateusz Morawiecki expressed his sorrow at the death as he visited the UK.
"This was a very sad day, and sad event," he said. "I know one line of the investigation by the police was that it might have been a hate crime, it remains to be seen what were the reasons.
"I hope it will never happen again, but yes, this will pose a question mark in many families, Polish families, in Great Britain."
The family of Mr Jozwik say they are "extremely devastated".
Mr Jozwik was assaulted at about 23:35 BST on Saturday outside the TGF Pizza and Mr Luigi's takeaway shops in The Stow.
His friend, a 43-year-old man, suffered hand and stomach injuries. He has since been discharged from hospital.
Five 15-year-old boys and one 16-year-old boy, all from Harlow, were arrested on suspicion of murder. All but one 15-year-old have been bailed.


Tunisian security forces "wasted time" before responding to a massacre on a beach resort as 30 British tourists were shot dead, a UK coroner has heard.

In total, 38 people died in the hour-long gun attack near Sousse in June 2015.
But local units deliberately "slowed down" as Islamist gunman Seifeddine Rezgui opened fire, said the counsel to the inquest into the British deaths.
The attack was the deadliest on Britons since the 7 July 2005 London bombings.
A senior Foreign Office official also defended the government's decision not to raise the level of its terror alert in Tunisia following shootings at a museum in the capital city of Tunis four months earlier.
Survivors share their stories of terror on the beach
Who were the British victims?
What exactly happened on that day?
The hearing at London's Royal Courts of Justice - set to last for seven weeks - began with a minute's silence and the names of all the victims being read out.
The 38 tourists who visited Tunisia for "relaxation and enjoyment" were "systematically" gunned down from around 11:30 local time on 26 June 2015, said Samantha Leek, counsel to the inquest.
She said the attack could have been stopped sooner, citing a Tunisian judge's report into failings by local security units.
Alison and Baron Caine, who were on the beach when the attack began, told the BBC that they escaped the gunfire and barricaded themselves in their hotel room.
"We started hearing screams, people were running," Mrs Caine said. "It was like a complete warzone."
The couple heard a knock on their hotel room door and a man saying he had their key.
"We looked at each other and we just thought this is it, we're going to die."
A lone armed guard was on the beach when Rezgui opened fire. The gunman also threw a grenade and left the guard "seemingly unconscious".
A second armed guard on duty was patrolling the nearby sea in a speedboat. He attempted to shoot Rezgui but could not work his gun.
Nearby security forces "had an ability to put an end to the attack" before the police arrived, Ms Leek said, but they "deliberately and unjustifiably slowed down to delay their arrival at the hotel".
Meanwhile, witnesses telling of the man with the gun in the speedboat may have led to confusion over how many attackers there were, she added.
Rezgui was shot dead by police about an hour after the attack began.
The court hearing the inquest's opening day of evidence was filled with relatives and friends of the British dead, who were aged between 19 and 80.
Three people from Ireland, two Germans, one Russian, a Belgian and a Portuguese woman were also killed.
They were all holidaymakers staying in the popular resort of Port El Kantaoui, just north of Sousse.
Three generations of a family - a young man, his uncle and grandfather - were among them.
At the time of the shootings, official travel advice from the UK Foreign Office did not specifically advise holidaymakers against going to Tunisia.
Instead the advice available on its website stated "further attacks are possible", following the killing of 24 people at the Bardo National Museum in Tunis on 19 March 2015.
Jane Marriott, the Foreign Office's Middle East and North Africa director,  told the inquest that the level of the terror alert relating to Tunisia had not been raised, with officials deciding "we should not discourage tourism to Tunisia".
The government did persuade Tunisian authorities to step up security in tourist areas, she said.
Ms Marriott said the UK was powerless to force Tunisia to improve its security, but "what we can and we do say is that we want to see an improvement in your security."
Over the next seven weeks, the court will examine whether the UK government and travel firms failed in their responsibility to protect British tourists.
The coroner, Judge Nicholas Loraine-Smith, will look at travel advice issued for Tunisia by the Foreign Office, as well as the security put in place at the hotel by tour operator Thomson.
The inquest was shown CCTV footage of Rezgui as he was dropped off in a white van.
Photos of the Imperial Marhaba Hotel, including its beach where the attacks started, were also shown as evidence.
Live TV feeds of the proceedings were also shown in courts in Cardiff and Stirling for survivors and relatives to watch.
The government has applied for some details to be kept private over national security concerns.
The Islamic State militant group said it was behind the attack by the Tunisian student.
The BBC's Panorama programme this month reported that the suspected "mastermind" behind the shootings is believed to be on the run in Libya.
Chamseddine al-Sandi recruited and directed Rezgui, according to documents obtained by Panorama.
And confessions from suspects arrested by Tunisian police state that al-Sandi ran a militant cell responsible for both shootings - the attacks at Sousse and at the Bardo National Museum.


Tourism bosses in Cumbria have called for the return of "a crucial piece" of England's highest mountain, which is on display in a London art gallery.

The one inch piece of stone was taken from the top of Scafell Pike by artist Oscar Santillan and features in his exhibition at the Copperfield Gallery.
Cumbria Tourism said this was "taking the Mickey" and wanted the "top of the mountain" returned.
Mr Santillan said he had "not harmed" the landscape.
At 978m (3,209ft), Scafell Pike is the highest peak in England.
The artist likened his removal of the rock to taking a pebble from a beach.
"That is what I have done in making my work 'The Intruder'," he added.
Ian Stephens, from Cumbria Tourism, said: ''We are all aware that Cumbria's landscape has long inspired generations of artists, who have all taken a piece of this landscape away in the figurative sense.
"But this is taking the Mickey and we want the top of our mountain back.''


French Open champion Stan Wawrinka has urged the governing body of men's tennis to act on "unacceptable" comments made by Nick Kyrgios about his girlfriend in their Rogers Cup tie.

On-court microphones apparently picked up the Australian, 20, making a lewd suggestion about Wawrinka's girlfriend.
"There is no need for this kind of behaviour," said the Swiss, 30, who withdrew from the match through injury.
"I really hope the ATP will take major action against him this time."
Speaking on court after progressing from the second round in Montreal, Kyrgios claimed he had been provoked by the world number five.
Kyrgios said: "He was getting a bit lippy with me. Kind of in the heat of the moment, I don't know, I just said it."
However, Wawrinka believes the Tour should take action over the latest controversy surrounding Kyrgios, which follows his often-petulant performance at Wimbledon in July.
Kyrgios was booed by the crowd when he appeared to stop trying in the second set of his fourth-round defeat by Richard Gasquet and clashed twice with umpires during the championship.
Wawrinka added: "It's not the first time that he has big problems on court in terms of what he says and in terms of how he acts.
"I hope the governing body does not stand for this."
Kyrgios, who made his big breakthrough when he knocked Rafael Nadal out of Wimbledon in 2014, is expected to play in Australia's Davis Cup semi-final against Great Britain in Glasgow next month.


The public relations firm run by the son of First Minister Peter Robinson says it has not been involved in any way in the controversial sale of National Asset Management Agency's (Nama) Northern Ireland properties.

US investment firm Cerberus bought the entire portfolio from Nama for more than Â£1bn last April.
The Irish News revealed that Verbatim Communications worked for Tughans, the legal firm involved in the Nama affair.
The company is run by Gareth Robinson.
It organised an event about Tughans' association with Queen's University's postgraduate and executive education centre in 2012.
But in a statement, Belfast-based Verbatim Communications said that "at no time" has the firm been employed by Nama, Pimco or Cerberus.
Verbatim said none of its "employees or representatives facilitated or were in any way involved in the sale of Nama assets to Cerberus".
"Neither the company nor anyone representing the company benefited from the Cerberus/Nama transaction nor did they ever expect to".
The statement added that the company "fully supports all investigations into the matter whether in the Republic of Ireland or Northern Ireland".
It confirms that "on one occasion, three years ago, Verbatim Communications Ltd was engaged by Tughans to assist with a very successful event relating to third level education".
Verbatim Communications said it "acts in a professional and ethical manner at all times and any suggestion to the contrary will be vigorously challenged".
Gareth Robinson, a former DUP councillor in Castlereagh, is listed as the only director of Verbatim Communications.
In October, Justice Minister David Ford raised questions about whether Peter Robinson should have declared an interest when inquiring about the costs associated with policing a world title boxing match in Belfast involving Carl Frampton.
The Irish News had reported that Gareth Robinson played a role in promoting the fight.
However, the first minister rejected the suggestion that he should have declared an interest, and said a discussion at the Stormont executive had related to the general policy of police charging for events.


One of two teenage girls from the Isle of Barra who was unaccounted for after the suicide bombing in Manchester has been found alive in hospital.

Fifteen-year-old Laura MacIntyre is said to be seriously injured. Her friend, 14-year-old Eilidh MacLeod remains unaccounted for.
Twenty-two people were killed and about 60 others were wounded in the explosion at Manchester's MEN arena.
The teenagers had not been seen since the attack on Monday night.
The explosion came as crowds were leaving a performance by US singer Ariana Grande at 22:35.
The girls, who are pupils at Castlebay Community School, were accompanied by family on their trip to Manchester.
Both girls' parents have flown to Manchester.
Angus MacNeil, the former Western Isles MP, who knows the families of both girls, said Laura's injuries would suggest she had not been far from the bomber.
He told the BBC:  "Laura is in hospital. She's alive, she's in a serious condition. We are still very worried for her, of course, the whole island is worried.
"We are very worried for Eilidh MacLeod. Our hearts go out to both families. It's been a huge shock to everyone on the island."
He said he had been to see Laura's grandmother who he knew very well.
"There's just shock and disbelief," he said.
Speaking about Laura he said: "If we are guessing from her injuries, she wasn't far from the bomber."
He added that Laura was a great friend of his daughter.
"She's often round my house here," he said. "My daughter calls Laura's granny her granny. Eilidh is a good piper in the island. They are just both lovely girls.
"It's difficult for the community. People are trying to make sense of how this could happen - how you could leave a wee place like Barra and be caught up in this.
"It's very difficult to process and to understand and to find reasoning for it."
He also spoke about the impact on the close-knit community.
"If people here don't have children the age of Laura and Eilidh they will certainly know their families," he said. "They are feeling the pain of the families.
"This does seem a very different place to the world of international terrorism on the news."
Nicola Sturgeon earlier told MSPs that Police Scotland and the Scottish government were offering support.
She told the Scottish Parliament: "Police Scotland are in contact with and offering support to the families of Laura MacIntyre and Eilidh MacLeod, the two young girls from Barra who are still unaccounted for having attended the concert last night.
"It is hard for anyone of us to imagine the anguish their families are going through right now. They are in our thoughts."
Ms Sturgeon added: "The Scottish government and Police Scotland will do all we possibly can to ensure they have all the support that they need."
Laura's father Michael MacIntyre earlier tweeted: "Please...please retweet. Looking for my daughter and her friend. Laura Macintyre and Eilidh Macleod  #manchesterattack"
An appeal by Eilidh's aunt Margaret MacNeil has also been shared tens of thousands of times on Facebook. She said at 10:00 on Tuesday that there was still no news.
Western Isles Council - Comhairle nan Eilean Siar - earlier said it shared the concerns of the girls' families.
A spokesman for the comhairle said: "We are closely monitoring events around Eilidh and Laura.
"Our thoughts are with the families of the two girls."
The local authority said it was "mindful of the impact" on pupils and staff at Castlebay Community School and was providing "all necessary support".
Lauren Baxter, 20, from Glasgow, has told BBC Scotland of the scene inside the arena at the time of the attack.
She said: "There was a loud bang from the back of the arena.
"I thought it was seating had fallen or the stage had fallen down. That was how loud it was."
Ms Baxter then saw people running and screaming.
She said: "There were thousands in the arena when this happened. People were running upstairs trying to get out."
Greater Manchester Police said the lone male attacker, who died in the blast, was carrying an improvised explosive device which he detonated.
Sixty ambulances attended the incident and those wounded are being treated at six hospitals around the city.
In the aftermath of the attack witnesses spoke about the fear and confusion that gripped those caught up in the events.
A man from Glasgow, who was at the concert with his 11-year-old daughter, told the BBC he was leaving the arena about 90 seconds after Ariana Grande came off the stage and was about two rows from the front when he heard a "big boom".
The father, Clark, said: "Then there was sheer panic. And then we had to get out. That's all we know, we got out after that and we came back up to the hotel because everybody was being told to leave as soon as possible."
He said: "There were bodies running everywhere. Kids screaming. Everybody ran right to the front and I had to shield Ashlyn against the railings instead of getting crushed - and there was little girls shielding in beside me as well, so I was trying to look after them as well.
"Then it started to calm down and everybody started to head back out after that."
His daughter Ashlyn said: "I just thought that Ariana Grande would be ashamed of people being hurt at her concert.
"I was a wee bit nervous about what was going to happen next but I wasn't freaked or anything. I was just calm and just wanted to go back to my hotel because I was really sad and stuff."
Kerry Stewart and Terri Robertson from Aberdeen were at the concert and were making their way to the exit when the blast happened.
They told BBC Radio Five Live: "We came out of the toilet, about to go to the exit, and there were hundreds of people started running towards us.
"When we turned round there were people running from the other direction towards us and we got pushed into a room with heaps of kegs of beer. Everyone was fighting each other to try and get out an exit but it was a dead end.
"It wasn't a loud noise that startled us. It was just like a noise that you would have thought was part of the concert, until everybody started running.
"And then someone shouted 'there's the fire exit, run for safety' and we just started running."


A 15-year services contract awarded by an Essex council worth £20m a year to provider Serco has been ended early.

Thurrock Council said about 350 staff employed by the firm would now return to the council but it still had to find annual savings of £4m.
Council leader John Kent said: "We would rather any profits went direct on services to local people rather than Serco's shareholders."
Serco said after 10 years the contract was no longer fit-for-purpose.
Mr Kent said the services contract costs "Thurrock Council around £20m every year".
"We have agreed to pay just under £10m to end the contract - a lot of money, but only half what we have paid Serco in the last few years.
"That money is not simply a pay-off, but includes things like computer equipment and telephony that will transfer back to the council."
He admitted there is a loss of profit payment to Serco within the negotiated settlement to end the contract signed in 2004.
"I want to assure the 350 or so people who will be returning to the council that we will be working very closely with Serco to make that move is as smooth as possible over the coming months."
Sean Hanson, Serco's managing director for citizen services, said: "Unfortunately this old contract with Thurrock Council was no longer fit-for-purpose.
"It was in the interests of both Thurrock Council and Serco to end our partnership early.
"Our teams have delivered services over the last 10 years in support of local residents and I am proud of their achievements."


The deaths of Denis and Elaine Thwaites in the Tunisia terror attack were "ugly, brutal and inexcusable", mourners at their funeral were told.

Mr Thwaites, 70, and his wife, 69, were among 30 British tourists killed in a gun attack  in Sousse on 26 June.
The Reverend David Phillips told mourners in Fairhaven, Lytham, the couple were "two lovely, beautiful and precious people."
Mr Thwaites played football for Birmingham City from 1962-1972.
Onlookers wiped away tears and embraced each other as the funeral cortege arrived at Fairhaven United Reformed Church, known locally as The White Church.
The congregation heard the couple, who made Blackpool their home for the past 35 years, had looked forward to their stay at the Hotel Riu Imperial Marhaba.
Mr Phillips told mourners everyone had been "acutely aware of our helplessness" towards the "terrible thing that has happened".
He added: "Hearts have been broken, lives have been deeply scarred.
"Two lovely, beautiful and precious people have had their lives taken from them, without cause, and with a violence that was wholly undeserved.
"What was done was an ugly, brutal and inexcusable crime."
Mr Thwaites' elder sister Sandra said that it was through her brother's talent as a footballer "that his life and the life of the whole family would be changed and shaped forever".
Stockton-born Mr Thwaites was part of the Birmingham City squad that won the 1963 League Cup before he retired from football at the age of 27. He later moved with his family to Blackpool, where he worked as a hospital porter.
Former Birmingham players Malcolm Page. Alan Campbell, Malcolm Beard, Colin Green and Brian Sharples attended the funeral service.
Mr Page, 68, said: "His loyalty and great skill as a footballer were the two great things I will remember."
The funeral was followed by a private family service.