West Ham's hopes of qualifying for the Europa League group stage suffered a setback as they were held after leading 2-0 against Romania's Astra Giurgiu.
Goals by Enner Valencia and Mauro Zarate put the Hammers in control of the third qualifying round before James Collins's dismissal changed the game.
Fernando Boldrin made it 2-1 before debutant Angelo Ogbonna headed past his own keeper while attempting to clear.
West Ham now face a tough test in the second leg in Romania on 6 August.
A section of home fans at Upton Park vented their frustration by booing at the final whistle.
The Hammers had been control for almost an hour before Collins's red card turned the tie upside down and left Slaven Bilic's side with it all to do to reach the play-off round.
They also lost Valencia to a knee injury to compound Billic's problems.
West Ham make hard work of Europe
Having required penalties to see off Birkirkara in Malta in the previous round, West Ham are not making life easy for themselves in Europe.
|Who are Astra Giurgiu?|
|Astra finished fourth in Romania's top tier last season.||This is Astra's third season in European football.|
|They overcame Inverness Caledonian Thistle 1-0 on aggregate in the previous round.||Astra reached the group stage of the Europa League last season, losing one game and drawing another against Celtic.|
They qualified for the Europa League through the Fair Play League but have now had three players sent off in five Europa League games - one in every round.
Collins, who had already been booked, could have few complaints after pulling Constantin Budescu's shirt in the 59th minute.
The Hammers should have been more than 2-0 up by that stage, Ogbonna and Mauro Zarate both frustrated by keeper Silviu Lung Jr.
Valencia injury setback
As if losing a 2-0 lead was not bad enough, West Ham lost goalscorer Valencia to what looked like a serious injury.
The Ecuador forward was carried off on a stretcher soon after falling awkwardly, moments after defender Joey O'Brien had gone off with a suspected hamstring problem.
Valencia's powerful header had set the tone for a dominant Hammers first-half performance before the hosts imploded.
West Ham manager Slaven Bilic: "We were dominating the game. It was a very frustrating evening because we played well until the moment we had a player sent-off. We had chances to score the third goal.
"It was a professional foul from Collins and I can't blame him [referee]. The second yellow was harsh.
"We definitely played well in the first hour, but the game lasts 90 minutes and we had to react better to going down to 10 men."
- 17O'BrienBooked at 29minsSubstituted forBurkeat 36'minutes
- 19CollinsBooked at 59mins
- 3CresswellBooked at 79mins
- 10ZárateSubstituted forJarvisat 76'minutes
- 31E ValenciaSubstituted forMaigaat 37'minutes
- 27PayetBooked at 90mins
- 1Lung Jr.
- 13Morais Júnior
- 23BoldrinSubstituted forDandeaat 86'minutes
- 10BudescuBooked at 58minsSubstituted forLovinat 90+1'minutes
- 9EnacheBooked at 54mins
- 91de AmorimSubstituted forFloreaat 77'minutes
- Adrien Jaccottet
- Shots on Target