Keir Starmer will compare the job of rebuilding Britain to the clean-up operation which followed the riots.
Hundreds of volunteers came together in the wake of the recent disorder to repair the damage done by far-right thugs.
That included rebuilding walls outside a mosque which was targeted by racists in the wake of the Southport killings.
Three young children were killed at a Taylor Swift-themed dance class last month.
Misinformation spread online about the identity of the alleged killer - amplified by the likes of Nigel Farage - resulted in widespread disorder across England and in Northern Ireland.
In his first major speech since becoming PM, Starmer will tomorrow tell voters that “things will get worse before it gets better” as Labour tries to repair the damage done by 14 years of Tory rule.
Referring to the aftermath of the riots, he will say: “I feel real pride in the people who cleaned up the streets — rebuilt walls, repaired the damage.
“I thought about the obvious parallels. Because imagine the pride we will feel as a nation when after the hard work of clearing up the mess is done, we have a country that we have built together. Built to last.”
The prime minister will also say that the rioters exploited the “cracks” which had developed in the country since the last wave of civil unrest which hit the UK in 2011.
“When I think back to that time, I see just how far we’ve fallen,” he will say. “Because responding to those riots was hard, but dealing with the riots this summer was much harder.
“Not having enough prison spaces is about as fundamental a failure as you can get.
“And those people throwing rocks, torching cars, making threats - they didn’t just know the system was broken. They were betting on it. They were gaming it. They saw the cracks in our society after 14 years of populism and failure - and they exploited them. That’s what we have inherited.”