* Security push began in May
* Shi'ite gunmen hid in Awamiya old town, officials say
* Forces used armor, bulldozers
* Shi'ites complain of discrimination, government denies bias
AWAMIYA, Saudi Arabia, Aug 9 (Reuters) - A security campaign against Shi'ite Muslim gunmen in the eastern part of Saudi Arabia has reduced dozens of buildings in the town of Awamiya to husks and seen thousands of residents flee.
Security forces have been trying for three months to flush out gunmen behind years of attacks on police in the small town of around 30,000 that has been the center of protests by minority Shi'ites against the Sunni government.
Journalists on a government tour of the town on Wednesday were the first outside witnesses of the damage wrought by the rare battle in the tightly controlled kingdom, a key Western ally and the world's top oil exporter.
Reporters escorted by special forces in armored vehicles saw streets in Awamiya's old quarter transformed into a war zone a world away from the sparkling cityscapes elsewhere in the energy-rich Gulf. There was no fighting during the tour.
Rusted-out cars lay half-flattened next to eviscerated homes pocked with hundreds of bullet holes.
Crudely photocopied portraits of "martyrs" - one apparently just 16 years old - were tacked on streetlight posts and the walls of buildings still standing.
"The land which is mixed with the blood of martyrs gets sufficiently watered by God's light to defeat the mighty," blared graffiti along one rubble-strewn street.
Fighting picked up this month when elite forces joined an operation that authorities began in May to tear down the old quarter, known as al-Musawara, to prevent gunmen using the narrow streets to evade capture.
Casualty figures have not been published, but the ministry representative said eight members of a police rapid reaction team and four special forces troops have been killed since the latest campaign began. Residents say nine civilians have been killed in the violence in the past week.
Residents estimate that up to 20,000 people have fled or been evacuated to safer towns and villages nearby.
An interior ministry representative said the old quarter had been empty except for "terrorists" for the past six months, but the security forces had to wait until families left adjacent areas before they could begin their final push.
The authorities say they compensated residents who have had to leave.
Footage shared on social media on Wednesday showed security forces celebrating their progress by linking arms and dancing in a circle, their automatic weapons hoisted in the air.
But the fight may not yet be over, and the campaign may sow further discontent among the Shi'ite population which complains of discrimination, charges the kingdom's authorities deny.
Around ten bulldozers busily worked to demolish more buildings and scrape up the detritus of combat, and the soldiers driving them still wore their helmets and body armor.
The bright pink walls of a bedroom lay exposed on the first floor of a collapsed house.
A light brown-colored dog was seen wandering around, an orange leash still dragging behind him.
In place of al-Musawara, authorities say they will build an attractive district of shopping centers, office buildings, green spaces and fountains. (Writing by Noah Browning; Editing by Sonya Hepinstall)