Armed men shot and killed two guards Thursday outside a prison in the western city of Jiddah, before taking cover in a residential building where they were surrounded by Saudi security forces, state-run media reported.

The security forces brought in armored vehicles and helicopters to surround the building where the gunmen had fled, witnesses said.

The clashes started when the gunmen opened fire on guards outside the prison, sparking a gunbattle in which the two guards were killed, the Interior Ministry said in a statement carried on the government news agency.

Several Al Qaeda suspects are being held at Ruwais prison and it wasn't immediately clear if the attack was an effort to break the prisoners free.

Saudi Arabia has been waging a heavy crackdown on Al Qaeda militants since a wave of attacks on foreigners in the kingdom in 2003. The ministry said last week that 136 suspected militants have been arrested in the past three months, some of whom were planning suicide attacks in the kingdom.

Security forces have arrested several thousand men since Islamic militants launched a terror campaign in May 2003, when suicide bombers attacked three housing subdivisions for foreigners in Riyadh. The forces have achieved a certain measure of success, detaining or killing in shootouts most of the militants named on two lists of most-wanted suspects.