1 of 2
Salvatore Laporta, Associated Press
Napoli forward Eduardo Vargas of Chile, left, is fouled by two Cesena's defenders during a Cup of Italy soccer match at the San Paolo stadium in Naples, Italy, Thursday, Dec. 12, 2012.

MILAN — Goran Pandev's contentious late winner sent Napoli through to the Italian Cup quarterfinals on Thursday with a 2-1 victory over Serie A struggler Cesena.

Striker Eduardo Vargas had a nightmare debut for Napoli with his mistake giving Cesena defender Stefan Popescu the opener in the 20th minute.

However, Edinson Cavani equalized in the 65th minute before Pandev's goal in the 86th, which even television replays couldn't prove had gone in before Cesena goalkeeper Nicola Ravaglia had pushed the ball clear.

"I think the ball went in," Pandev said. "What was important was to win. The match was difficult but we're through and now we'll focus on the league.

"We want to win the Italian Cup a lot. Cesena had a great game tonight, but in the end we managed to turn the match around."

Napoli will now face either Inter Milan or Genoa.

Napoli, which is sixth in the Serie A standings, wasn't expected to struggle with Cesena in the relegation zone and having lost four of its past five games.

"From the second replay you can see that the ball is a hair's width inside," Cesena coach Daniele Arrigoni said. "If the linesman also saw that, then he did well to give it. What's important is to be sure. But in any case, that's how the match went.

"We were very good and we were always in the match. We also hardly suffered if you think that we were faced with a great team."

The home side started the brighter, with a period of sustained pressure on the Cesena goal. However, a combination of poor final balls and some solid defending meant Napoli never really had a proper sight of goal.

Cesena looked dangerous on the counterattack, and the visitors stunned the Stadio San Paolo crowd into silence when they took the lead. Vargas inadvertently touched the ball toward Popescu, who lashed it into the net from the edge of the area.

Napoli could have leveled six minutes later following a brilliant cross from Juan Zuniga but Cesena defender Marco Rossi did well to clear the danger just in time. Zuniga put in another great cross in the 34th minute but it was slightly too far in front of Cavani.

Things went from bad to worse for Vargas five minutes later when Cavani, finding himself in a good position in the area, swiveled and fired toward goal only for his new teammate to get in the way of his shot.

Pandev came on for Vargas at halftime and almost immediately equalized when his volleyed effort went narrowly wide.

The Macedonia striker was involved in Napoli's equalizer though, his powerful free kick being parried by Ravaglia for the onrushing Cavani to slot home.

And it was the dangerous Pandev who scored the winner with a free kick from out wide on the right flank from a curling delivery. Ravaglia landed before the line as he pushed the ball clear and, amid fierce protests from the Cesena players, the officials judged that the ball had crossed the line.