Manchester United has finally reached a major final under Ole Gunnar Solskjaer.

Not that he was in the mood for celebrating on Thursday.

An inspired goalkeeping performance by David de Gea ensured United was only beaten 3-2 by Roma in a wild second leg of the Europa League semifinals, allowing the English team to complete an 8-5 victory on aggregate.

Roma's Bryan Cristante, left, celebrates after scoring his side's second goal with his teammate Roger Ibanez during the Europa League semifinal, second leg soccer match between Roma and Manchester United at Rome's Olympic stadium, Italy, Thursday, May 6, 2021. (AP PhotoAlessandra Tarantino)

Roma's Bryan Cristante, left, celebrates after scoring his side's second goal with his teammate Roger Ibanez during the Europa League semifinal, second leg soccer match between Roma and Manchester United at Rome's Olympic stadium, Italy, Thursday, May 6, 2021. (AP PhotoAlessandra Tarantino)

It ended a run of four losses in the semifinals of major tournaments in the last 18 months for Solskjaer, who is under pressure to win United’s first trophy since 2017. That came in the Europa League, when Jose Mourinho was manager.

Yet Solskjaer was critical of his team for giving Roma so many chances at the Stadio Olimpico to turn around a semifinal that looked over after United scored five second-half goals to win the first leg 6-2 last week.

“We played one very good half at Old Trafford that got us through,” he said. “The second half today was disappointing. Very, very poor.”

Manchester United's Edinson Cavani celebrates after scoring his side's opening goal during the Europa League semifinal, second leg soccer match between Roma and Manchester United at Rome's Olympic stadium, Italy, Thursday, May 6, 2021. (AP PhotoAlessandra Tarantino)

Manchester United's Edinson Cavani celebrates after scoring his side's opening goal during the Europa League semifinal, second leg soccer match between Roma and Manchester United at Rome's Olympic stadium, Italy, Thursday, May 6, 2021. (AP PhotoAlessandra Tarantino)

Villarreal will be United’s opponent in the May 26 final in the Polish city of Gdansk after beating Arsenal 2-1 on aggregate in the other semifinal. The second leg finished 0-0 on Thursday.

Roma created enough clear-cut opportunities to pull off what would have been another remarkable comeback, three years ago after it recovered from 4-1 down against Barcelona in the Champions League quarterfinals, winning the second leg 3-0 at the Olimpico to advance.

Goals by Edin Dzeko and Bryan Cristante, in the 57th and 60th minute, briefly put Roma 2-1 ahead and that was the least the Italian team deserved after regularly breaching United’s defense. The visitors were thankful for a slew of saves by De Gea in both halves, ensuring Nicola Zalewski's deflected 83rd-minute winner on the 19-year-old's debut proved only a consolation for Roma.

Roma's Edin Dzeko, bottom, is challenged by Manchester United's Eric Bailly during the Europa League semifinal, second leg soccer match between Roma and Manchester United at Rome's Olympic stadium, Italy, Thursday, May 6, 2021. (AP PhotoAlessandra Tarantino)

Roma's Edin Dzeko, bottom, is challenged by Manchester United's Eric Bailly during the Europa League semifinal, second leg soccer match between Roma and Manchester United at Rome's Olympic stadium, Italy, Thursday, May 6, 2021. (AP PhotoAlessandra Tarantino)

“It was always going to be one of those games that was going to be open,” Solskjaer said. “It could easily have been 6-6. A strange game of football.

“Luckily we have one of the best goalkeepers in the world in nets,” he added about De Gea, who has fallen behind Dean Henderson in United's pecking order in recent weeks.

Roma couldn’t keep United at bay at the other end as Edinson Cavani showed his prowess as a finisher, opening the scoring in the 39th minute by taking a touch from Fred’s pass and smashing in a shot from just outside the area.

The 34-year-old Uruguayan's second goal, a header from Bruno Fernandes’ cross in the 68th, made it 2-2 and came as a relief for United because Roma was threatening to score at will.

“We ended the match thinking we could have made it to the final,” Roma coach Paulo Fonseca said.

Winning the Europa League was Roma’s only potential route back into the Champions League for next season, when it will be coached by Mourinho after the team chose this week to part ways with Fonseca.

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP_Sports