Newcastle avoided becoming the latest Premier League team to be upset by lower-league opposition in the FA Cup by beating second-tier Blackburn 4-2 after extra time in a third-round replay on Tuesday.

Spanish forwards Joselu and Ayoze Perez scored in extra time to earn Newcastle only a fifth victory in the competition in the past 11 seasons.

With the northeast team currently fighting a relegation battle in the Premier League, the win might not be entirely welcomed by Newcastle manager Rafa Benitez, who has acknowledged the FA Cup is not a priority because he feels a heavyweight like Manchester City, Chelsea or Manchester United will win it.

Newcastle United manager Rafael Benitez stands on the sidelines as he calls to players during the Emirates FA Cup third round replay soccer match at Ewood Park, Blackburn, Tuesday Jan. 15, 2019. (Martin RickettPA via AP)

Newcastle United manager Rafael Benitez stands on the sidelines as he calls to players during the Emirates FA Cup third round replay soccer match at Ewood Park, Blackburn, Tuesday Jan. 15, 2019. (Martin RickettPA via AP)

So the sight of two defenders — Ciaran Clark and Jamaal Lascelles — going off injured at Ewood Park would have been a big concern for Benitez days before a much bigger game in his eyes, a home league match against fellow relegation contender Cardiff.

A deep run in the FA Cup could, however, galvanize the fans in what is fast becoming another tough season for Newcastle and they had extra reason to cheer the team's first goalscorers as the visitors went 2-0 ahead after 22 minutes.

Both goals were netted by 21-year-old local players, with Sean Longstaff giving Newcastle the lead with a deflected shot inside the first minute and Callum Roberts adding a second in the 22nd. They were the players' first goals for the club.

Newcastle United's Callum Roberts, right, scores a goal during the Emirates FA Cup third round replay soccer match at Ewood Park, Blackburn, Tuesday Jan. 15, 2019. (Martin RickettPA via AP)

Newcastle United's Callum Roberts, right, scores a goal during the Emirates FA Cup third round replay soccer match at Ewood Park, Blackburn, Tuesday Jan. 15, 2019. (Martin RickettPA via AP)

Blackburn went into halftime on level terms through goals by Adam Armstrong, a former Newcastle player, and Darragh Lenihan.

Newcastle's reward is a home match against Watford as the team looks to get beyond the fourth round for the first time since 2006 — before divisive owner Mike Ashley bought the club.

Four top-flight teams — Fulham, Leicester, Cardiff and Huddersfield — have already lost to sides from a lower division in the third round.

Blackburn's Adam Armstrong rounds Newcastle United's Freddie Woodman to score a goal during the Emirates FA Cup third round replay soccer match at Ewood Park, Blackburn, Tuesday Jan. 15, 2019. (Martin RickettPA via AP)

Blackburn's Adam Armstrong rounds Newcastle United's Freddie Woodman to score a goal during the Emirates FA Cup third round replay soccer match at Ewood Park, Blackburn, Tuesday Jan. 15, 2019. (Martin RickettPA via AP)

In other replays, third-tier Shrewsbury scored three goals from the 71st minute to rally to a 3-2 win over second-tier Stoke and set up a match against Wolverhampton Wanderers, the team that knocked out Liverpool.

Sheffield Wednesday won 1-0 at Luton and will next play titleholder Chelsea.

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports