*A rep for rapper Petey Pablo is now claiming that the gun in his bag at the North Carolina airport on Sept. 11th belonged to a friend he believed may have been suicidal.

As previously reported, Pablo – born Moses Barrett III – was arrested on Saturday at RDU Airport in North Carolina after a TSA officer found a Smith & Wesson pistol in his carry-on.

But Petey’s rep tells TMZ that the gun actually belongs to one of his friends. And last month, Petey learned that the friend planned to use the pistol to “do something crazy” … so Petey stepped in and literally took the weapon away.

The rep tells us Petey hid the gun in a luggage bag so his friend wouldn’t find it — and when he was asked to hop on a last-minute flight to L.A., he grabbed the loaded bag without thinking.

Pablo was arrested on suspicion of carrying a concealed weapon, possession of a firearm by a felon and possession of a stolen firearm. He’s due back in Wake County Court October 4.