Bahrain qualify for World Cup play-offs
Bahrain only needed a draw to make the play-offs but grabbed all three points after Mahmood Abdulrahman scored from a stunning free kick in the 74th minute.
The hosts then had Abdulla Marzooq sent off four minutes later but held on for victory.
Bahrain finished third in Group One behind Australia and Japan, who had already qualified automatically for South Africa 2010.
Bahrain next play Saudi Arabia, the third-placed team from Group Two, over two legs in September after they drew 0-0 with North Korea in Riyadh on Wednesday.
The winners advance to a home and away play-off against Oceania winners New Zealand in October and November for a place in South Africa.
Bahrain, one of the most improved sides in Asia in recent times, have never qualified for the World Cup finals but came close four years ago.
They won the Asian playoff against Uzbekistan before being beaten by Trinidad and Tobago in an inter-confederation play-off.