Spector’s first goals in three years had sent West Ham storming into the Carling Cup semi-finals with a 4-0 victory over Manchester United.
The American, playing in the same central midfield role, put the Hammers ahead again today before substitute Frederic Piquionne rifled home a late second.
West Ham’s FA Cup fourth round place would have been sealed by half-time had Barnsley goalkeeper Luke Steele not produced four vital saves, three of them from Zavon Hines.
Inexplicably, Avram Grant’s men then stopped playing after the interval and the second half was far more nervy for the Upton Park crowd than it should have been.
Piquionne’s injury-time strike came moments after Barnsley’s Adam Hammill saw his deflected shot loop onto the bar and bounce away.
With Tuesday’s semi-final first leg against Birmingham in mind, Grant made eight changes to the side that lost 5-0 to Newcastle on Wednesday.
Hines and striker Frank Nouble were given their first starts of the season and Robert Green captained the team with Scott Parker and Matthew Upson on the bench.
Luis Boa Morte lined up in West Ham’s problem position of left-back with Spector alongside Mark Noble in midfield.
Referee Neil Swarbrick waved away Barnsley’s early penalty appeals when Adam Hammill went down in the box and, apart from a long-range Garry O’Connor strike, West Ham dominated the rest of the first half.
Victor Obinna poked a pass through for Nouble, who cut the ball back for Hines but the winger’s shot was well blocked by the advancing Steele.
The Barnsley goalkeeper, who spent four years on Manchester United’s books, then smothered an angled drive from Nouble who had been teed up by Noble’s delicate through ball.
Barnsley received another let-off moments later when Nouble picked out Obinna with a lofted pass and the Nigerian’s left-foot volley flew just wide of the far post
Still West Ham surged forward and Steele denied them again, producing another strong block after Nouble had found space on the right side of the Barnsley box.
Boa Morte then picked out Pablo Barrera at the far post but the unmarked Mexican winger planted his header wide.
West Ham came close again when Nouble’s shot deflected off Noble and spun just wide of the near post before finally breaking the deadlock
Noble created the opportunity with a determined run forward and Spector beat Steele with a low angled drive which nestled inside the far post.
There was little Steele could have done about the goal but he then pulled off a brilliant double save from Hines, which prevented West Ham from doubling their lead before the interval.
Barrera picked out Hines in space at the far post but Steele got across quickly and produced two stops from point-blank range before Nouble skied his shot over the bar.
Barnsley had not exploited West Ham’s weakness at left back until early in the second half, when Lovre got in behind Boa Morte and pulled a cross back for O’Connor.
Winston Reid stole in for the interception and West Ham broke clear, with Hines cutting in from the left flank before whistling a shot across the face of goal.
Lovre was replaced by Jacob Butterfield after 56 minutes and the new arrival made an immediate impact with a tricky run into the West Ham box before going down under Reid’s challenge.
Referee Swarbrick infuriated the Barnsley bench by waving play on and he was greeted with chants of “You don’t know what you’re doing” from the visiting supporters.
It was another let-off for West Ham, whose pace and intensity had dropped after half-time as if they were happy to sit back and defend a one goal lead.
When West Ham did piece together a promising move Nouble exchanged passes with Obinna to go through on goal but he scuffed his shot and Barnsley were able to clear.
Parker and Piquionne both came on and West Ham eventually rediscovered their touch with Boa Morte escaping down the left.
Barrera met the cross but was denied his first West Ham goal by another instinctive double save from Steele.
Hammill almost punished West Ham but his deflected shot bounced back off the woodwork and Piquionne rifled his shot past Steele to wrap up the victory.