Juninho and Middlesbrough rode their luck last night before stumbling into the fourth round of the Carling Cup.

Gaizka Mendieta's first goal for the club secured victory against Wigan Athletic, who gave Middlesbrough a searching examination at the JJB Stadium.

Juninho was on the periphery for much of the game but he was the architect of the win when he set up the 66th minute winner.

The Brazilian blocked a clearance near the halfway line and stabbed the loose ball past goalkeeper Gary Walsh as he raced down the right wing.

Although former Boro star Walsh was stranded, Juninho still had plenty of work to do as he cut inside from close to the corner flag.

But as Wigan defenders desperately raced back towards their goal, the World Cup winner found Mendieta in space 12 yards out and he drilled his shot home.

Boro had been clinging on to the 1-0 lead that came about in fortuitous circumstances.

Danny Mills surged forward and unleashed a 20-yard shot which deflected off Massimo Maccarone and beyond the stranded Walsh.

That was the cue for a prolonged spell of Wigan pressure. The closest they came to equalising was when Lee McCulloch hit the bar but, having spurned a series of chances, they grabbed a lifeline when Jimmy Bullard smashed home a free-kick 15 minutes from time.

Boro held firm to ease the pressure on Steve McClaren ahead of Saturday's crucial Premiership clash with Wolves and will face Everton at home in the next round.

McClaren said: "Getting a home draw was important because when you get to the last 16 you know you'll have a hard game.

"There are no easy games, as we can vouch. We won a tight game against Everton last month."

Michael Ricketts' miserable run continues unchecked, the out-of-sorts striker substituted after 57 minutes following another pallid display. But Maccarone's goal on his first start of the season after recovering from a knee injury will boost his confidence.

Wigan asked probing questions of a Boro side showing six changes from Sunday's draw at Tottenham.

Result: Wigan Athletic 1, Middlesbrough 2.

Read more about Middlesbrough here.