Somebody is watching over Officer Thomas Richards.



The lucky Manhattan cop was saved by his belt Monday when a man with a rusty illegal weapon fired a round that hit his gun clip — instead of him.



Dodging a life-threatening wound, Richards was left with a dime-sized dint in the ammo magazine — and a heckuva story for his girlfriend. The metal clip, inside a bullet-pierced pouch, was on the left side of his leather gun belt and just above his hip.



Relieved Police Commissioner Raymond Kelly pronounced Richards' close call "another miracle."



"An inch either way, it would have been right in his stomach," he said. "The magazine may have well saved his life."



Even more remarkable, Richards — who realized he'd been hit but continued chasing his attacker — managed to fire at least seven shots, including one that police believe wounded Luis Martinez, a suspected drug dealer.



Richards "was just meant to be saved and have a future," said Gary Aquilone, who lives near the officer on Long Island. "He's got a second chance."



A police officer's gun belt generally has handcuffs, pepper spray, a gas mask, keys, a baton and a pouch containing two magazines.



The wild gun battle erupted early Monday while Richards and partner Thomas Dunne Jr., both assigned to Police Service Area 4 in Manhattan, were patrolling the Baruch Houses on the lower East Side.



While police say the pursuing cops fired 18 shots and Martinez fired at least three times, investigators working in the sealed-off crime scene marked at least 54 spots where shell casings were found.



Richards, 36, and Dunne, 30, were standing outside their police van, which was parked on Delancey St., when they noticed Martinez, a 25-year-old with a sealed arrest record, heading in their direction. It was 1:44 a.m.



"When (Martinez) sees them, he does an abrupt about-face," NYPD spokesman Paul Browne said.



When the officers caught up to Martinez outside 47 Columbia St., the suspect suddenly opened fire three times, "striking Richards in his ammunition belt," Kelly said.



Richards, armed with a 9-mm. Smith & Wesson, returned fire, as did Dunne, who fired at least 10 rounds, police said. But when Martinez tried to fire back, his gun jammed.



Wounded, Martinez ran into the Baruch Houses with the cops hot on his heels — and while terrified residents, roused by the gunfire, looked on in horror.



"I saw the guy shoot at one officer, who ducked, and they kept chasing him," said a 48-year-old witness named Evelyn, who declined to give her last name. "It was like a movie. I couldn't believe the officers kept going after him because he kept shooting."



"It sounded like a big gun battle," added Millie Rodriguez, 44. "You heard it go back and forth like a war."



About 200 feet from 64 Baruch Drive, Martinez stopped, turned and tried to fire again at the pursuing officers.



His gun jammed again.



Dunne got off another shot and yelled at Martinez to give up, police said. Instead, the suspect ducked inside the building and raced to his apartment.



Once inside his pad, a frantic Martinez tossed four bags of marijuana and a measuring scale out the window and then lay down on his bed, police said.



"The cops rolled up on me and I shot one of them," Martinez told his wife, according to a law enforcement source. "I just want to die."



While Martinez played possum, Emergency Service Unit cops followed a trail of blood inside the building that ended abruptly on the sixth floor.



Unable to tell which apartment was Martinez's, they called for ESU Officer Anthony Conpitello and his 6-year-old dog, Caesar, who sniffed out the suspect.



Martinez gave up without a fight and was in stable condition at Bellevue Hospital, awaiting charges. It was not immediately clear why his rap sheet was sealed.



The suspect's semiautomatic 9-mm. Taurus handgun was recovered from the building's trash compactor, cops said. Police said the suspect's gun was purchased by a woman in Newport News, Va., in August 2010. A source said police are investigating whether the gun was acquired during a straw purchase in Virginia.



Most of the illegal guns that wind up on city streets are bought in Pennsylvania, Virginia and states even further south, according to Kelly and Mayor Bloomberg. Then they're sold in the city for three times their value.



Monday's shooting was the fourth time a city cop was shot in two months. One officer, Peter Figoski, was killed.



Richards, who has been on the job for 11 years, lives with his girlfriend, Nicole, neighbors said.



"He's a sweetheart," Aquilone said. "He's such a quiet guy. My brother was a cop in the city for 21 years, so I know it's a tough job. Thank God he's okay."



rparascandola@nydailynews.com