Match ends, Azerbaijan 2, Northern Ireland 0.
Northern Ireland have suffered a second successive embarrassing defeat, going down to minnows Azerbaijan.
Michael O'Neill's side lost to Luxembourg in September but dominated the first half in Baku.
However, Rufat Dadasov fired in and, though Martin Paterson hit a post, Mahir Shukorov scored a free-kick after Jonny Evans saw red for kicking out.
The loss means Northern Ireland slip behind Azerbaijan to fifth in their World Cup qualifying group.
O'Neill opted for a new-look 3-5-2 formation as Northern Ireland attempted to bounce back from the humiliating 3-2 defeat by Luxembourg.
The visitors controlled the first half in the Bakcell Arena, but failed to secure a deserved lead.
Azerbaijan keeper Kamran Agayev kept out a powerful Chris Brunt strike before producing a superb reflex save with his feet from Jamie Ward's close-range header.
The hosts offered nothing in attack until midway through the half, when they squandered two good chances within three minutes.
Dadasov fired wide from 12 yards, before the unmarked Rauf Aliyev saw his back-post volley saved by an alert Roy Carroll.
Northern Ireland were soon back on top and Agayev denied Brunt again, while Ward's shot curled over the bar.
The best chance fell to Paterson on 38 minutes, with the striker put clear by Lee Hodson, only to drag his low shot wide.
Azerbaijan took command after the break and poor marking allowed Dadashov room to sweep the ball wide from eight yards.
Oliver Norwood's lunge at Aliyev resulted in a yellow card and a suspension for the final qualifier against Israel on Tuesday.
However, the big Kaiserslautern striker made no mistake in the 58th minute, slotting past Carroll from Aliyev's low cross for the opener.
Gareth McAuley's header found the roof of the net as Northern Ireland chased an equaliser, but the main goal threat was coming from their opponents.
A fluent move on 62 minutes ended with Aliyev's long-range strike, from a Dadasov lay-off, flying just over as a lethargic Northern Ireland failed to sustain any pressure on the home goal until the dying moments.
Steve Davis picked out Paterson with three minutes left and the Huddersfield forward's volley struck the woodwork before the ball was cleared.
In a nightmare finish for Northern Ireland, McAuley received a second yellow card of the qualifying campaign to be suspended for the Israel game along with Evans, who was shown a straight red card in injury time for kicking out at Aliyev.
With the last kick of the game, Shukurov curled the resulting 20-yard free-kick into the top corner.
- 3RamaldanovBooked at 63mins
- 15Oglu AbdullayevSubstituted forÖzkaraat 82'minutes
- 10DadashovSubstituted forHuseynovat 90+3'minutes
- 17NadirovSubstituted forHuseynovat 45'minutes
- 2HodsonSubstituted forMcGinnat 66'minutes
- 5EvansBooked at 90mins
- 16NorwoodBooked at 55mins
- 19WardSubstituted forGriggat 84'minutes
- 11BruntSubstituted forMckayat 74'minutes
- Andrea De Marco
- Shots on Target
Second Half ends, Azerbaijan 2, Northern Ireland 0.
Goal! Azerbaijan 2, Northern Ireland 0. Mahir Shukurov (Azerbaijan) from a free kick with a right footed shot to the top right corner.
Jonny Evans (Northern Ireland) is shown the red card for a bad foul.
Foul by Jonny Evans (Northern Ireland).
Rauf Aliyev (Azerbaijan) wins a free kick in the attacking half.
Substitution, Azerbaijan. Badavi Huseynov replaces Rufat Dadashov.
Attempt missed. Steven Davis (Northern Ireland) right footed shot from outside the box is high and wide to the right. Assisted by Billy McKay.
Foul by Billy McKay (Northern Ireland).
Rahid Amirquliyev (Azerbaijan) wins a free kick in the defensive half.
Foul by Gareth McAuley (Northern Ireland).
Rufat Dadashov (Azerbaijan) wins a free kick in the attacking half.
Attempt missed. William Grigg (Northern Ireland) header from the centre of the box is too high. Assisted by Oliver Norwood with a cross following a corner.
Corner, Northern Ireland. Conceded by Kamran Agayev.
Attempt saved. Martin Paterson (Northern Ireland) right footed shot from the right side of the six yard box is saved in the bottom right corner. Assisted by Steven Davis.
Martin Paterson (Northern Ireland) hits the right post with a right footed shot from the right side of the box. Assisted by Steven Davis.
Attempt missed. Oliver Norwood (Northern Ireland) right footed shot from outside the box is too high from a direct free kick.
Hand ball by Mahir Shukurov (Azerbaijan).
Substitution, Northern Ireland. William Grigg replaces Jamie Ward.
Attempt blocked. Martin Paterson (Northern Ireland) left footed shot from the centre of the box is blocked. Assisted by Jamie Ward.