YJL now has a combined turnover of more than £400m a year, propelling it into the top 15 contractors in the UK.
YJL chief executive Roger Feast said the construction arm would keep the Allen brand and trade as a subsidiary.
Allen's construction head Nick Davies will leave the Allen board but it is understood that he has been offered a position at YJL.
Feast added: "It's a strategic move that expands us into regions we previously didn't cover. Nearly all Allen's clients are different to ours, so it is a nice fit." Allen's contracting arm has 600 staff operating in North-west England, Yorkshire, the Midlands, the South-east and the South-west.
Allen finance director Neil O'Brien said estimates that the construction business would lose £13m on current contracts were accurate.
He said: "It's a sad day for us because it is the heart of the Allen group but we dug ourselves a big hole in building.
"Construction companies making losses aren't worth much at all but this is a quick deal that gives us a clean break. The staff can be happy they are with a firm that concentrates on and knows building." Allen will now focus on its equipment hire business and plans to change its name to Speedy Hire. It is also planning to sell its utilities division, Ryan.
YJL's Feast said he was confident the contracting arm's troubles were history. He said: "We're sure they have got rid of the problems so it makes sense to take it on. We think we've bought a good one." Allen's former chief executive Ken Fox and former chairman Don Greenhalgh left the group to launch a bid for the construction arm. They were originally seen as favourites but fell by the wayside.
O'Brien said the YJL bid was better than the others in every respect: in particular it had offered Allen a more generous settlement than other bidders and had wanted to wrap up the deal without delay.
He added: "But most importantly, YJL was able to us more confidence that this would be a clean break for us." The deal, which needs to be approved by YJL shareholders, is expected to be finalised in six weeks.
Under the deal, Allen will pump £5.9m into the division and pay YJL another £700,000 for properties owned by the construction arm but used by Speedy Hire. YJL will then pay £1m for the business.