SAN'A, Yemen (AP) — Two al-Qaida militants ambushed a bus carrying Yemeni security personnel in the capital on Saturday, spraying the vehicle with gunfire and injuring 10 passengers, a security official said.

The violence shifted to the capital after a five-day offensive to flush out 120 al-Qaida militants who had holed up in a town in the lawless southern region where the local branch of the terror group has found safe haven.

The gunmen, moving on foot, opened fire on the bus as it was transporting security personnel back to their base in a crowded neighborhood in western San'a, the security official said. The gunmen fled.

The official spoke on condition of anonymity because he was not authorized to speak to the press.

The gunmen were able to evade security and carry out the ambush despite a tip-off received a day earlier by the San'a police chief that al-Qaida was plotting attacks against security bases in the capital.

In response to the warning, police increased security around a major base in a southern San'a neighborhood that is also home to foreign embassies. The main road leading to the neighborhood was also sealed and several additional checkpoints were put up in various parts of the capital.

San'a is one of the few areas under the control of Yemen's weak government. Beyond the city, al-Qaida and other Islamic militants roam relatively freely, particularly in the remote, mountainous Shabwa province in the south.

Yemeni forces, backed by tanks and heavy artillery, drove al-Qaida militants from the town of Hawta in Shabwa province on Friday after five days of fighting.

Thousands of the town's residents were forced to flee and the al-Qaida militants took over homes as shelters.

The military said the militants fled into the mountains and that soldiers were chasing them.

Area tribal chiefs, however, said they had negotiated an end to the siege and persuaded the militants to leave peacefully before the army entered the town.

Yemen, the poorest nation in the Arab world, suffers major internal security problems other than al-Qaida — an on-and-off Shiite rebellion in the north and a separate secessionist movement in the south.

It is intensifying its campaign against al-Qaida in the Arabian Peninsula a year and a half after the group formed with the merger of the Yemeni and Saudi branches.

The U.S. is aiding Yemen's military financially and with training. Washington is deeply concerned about the group, which claimed responsibility for the failed attempt to down a Detroit-bound jetliner with a suicide bomber in December.