The right-back made 126 appearances for Wanderers in two-and-a-half years, scoring four times.

He played 18 times for Steven Schumacher’s side this season but fell behind Cyrus Christie and Jordi Osei-Tutu in the pecking order and until he lined-up against Port Vale in the Vertu Trophy on Tuesday night, had not featured since the 4-0 FA Cup defeat at Swindon Town at the start of December.

Stockport boss Dave Challinor said the defender’s availability in January had come as some surprise to him.

“We are delighted to welcome Josh to the club,” he said. “He’s been a player that’s been on our radar for some time, but I think it’s fair to say that we didn’t think he’d be available – so to add him to our group is great.

“He has brilliant experience at the level, at a club with expectation, and he’s the perfect profile for what we want as a right-back or wing-back. I know he’s excited about the challenge ahead of him, and we’re really looking forward to working with him and being successful together.”

County’s head of recruitment, Jonathan Smith added: “We’re delighted to bring in a player that we’ve tracked closely over a long period, going back to his time at Tranmere.

“His physical attributes are exceptional; he understands the demands of the level we are currently at, and he gives us a solution in a position that’s been a clear focus for us.

“His availability has also been exceptional over an extended period of time. It’s a move that makes sense on every level.”

Dacres-Cogley becomes the fifth first team departure of the January transfer window, joining Will Forrester, Victor Adeboyejo, Tyler Miller and Teddy Sharman-Lowe.

More exits are likely as Schumacher trims the size of his squad for the second half of the season, although the Bolton boss insist the club are still actively trying to recruit players who can add quality.

Wanderers have added three players in the window so far – two goalkeepers, David Harrington and Jack Bonham, and Irish youngster Lewis Temple.