Barcelona needed extra-time to reach the Copa del Rey final on Wednesday, with a 3-2 aggregate win over Sevilla coming just two days after a police raid on the club and the arrest of their former president.

Having trailed 2-0 from the first leg, Danish international Martin Braithwaite hit the crucial goal in the fifth minute of extra-time with a diving header off a Jordi Alba cross.

Gerard Pique had equalised in the fourth minute of stoppage time with virtually the last play of the game to save Barca. The veteran international headed in at the near post after a fine cross from Antoine Griezmann.

That was after Ousmane Dembele, who scored in the 2-0 win at Sevilla in La Liga at the weekend, had given the 30-time Spanish Cup winners a 12th-minute lead in the second leg with a right-foot drive from outside the area.

Sevilla could have killed the game off in the 73rd minute to deny Barca their place in the final for a 42nd time.

They were awarded a penalty when Lucas Ocampos was brought down by Oscar Mingueza. However, Ocampos saw his tame right-foot effort from the spot saved by Marc-Andre ter Stegen.

Flagging Sevilla were then reduced to 10 men in injury time when Brazilian Fernando was red-carded for a foul on Francisco Trincao.

“The team deserved to qualify,” said Barca coach Ronald Koeman. “For their work and honesty. We are more aggressive, we’ve always created chances, the team has improved enormously.

“This is a very important result for the club, for the players, and for me of course as well. This is an important step in earning a title.”

It was a much-needed win for Barcelona after former president Josep Maria Bartomeu, current chief executive Oscar Grau, head of legal services Roma Gomez Ponti and Bartomeu’s advisor Jaume Masferrer were arrested by Catalan police, who searched the club’s offices on Monday morning. They were all questioned in relation to last year’s “Barcagate” scandal.

The club holds its presidential elections later this week.

The search of Barcelona’s stadium was part of a probe into allegations the club carried out a defamation campaign against current and former players who were critical of Bartomeu. Spanish radio station Cadena Ser claimed in February 2020 that Barca covered up inflated payments to a company called I3 Ventures which it had hired to boost the image of the club on social media.

Part of the social media campaign included criticising current and former players like Lionel Messi and Xavi Hernandez, and iconic coach Pep Guardiola.

Barcelona will face either Athletic Bilbao or Levante, who are 1-1 in their semi-final, in the final on April 17 in Seville.

Before that, however, Barcelona will attempt another comeback effort when they take on Paris Saint-Germain in the second leg of their Champions League last 16 tie next week. Barca trail 4-1 from the first leg.

Sevilla coach Julen Lopetegui admitted Wednesday’s defeat was a “bitter pill to swallow”.

“We are disappointed and sad to be deprived of a final.

“We experienced the most crushing feeling in football, conceding with the last kick of the game (in normal time).”