EXCLUSIVE

NBA forward Matt Barnes was arrested tonight for an outstanding traffic warrant, and for allegedly mouthing off -- BIGTIME -- to the arresting officer, TMZ has learned.

According to law enforcement sources, Barnes was busted by police in Manhattan Beach, CA for a misdemeanor traffic warrant, and we're told he also resisted the arresting officer.

Barnes is currently being booked by Manhattan Beach PD for the traffic violation, and for resisting an executive officer ... a felony.

According to our sources ... Matt was walking in Manhattan Beach around 8:30PM when he was first approached by Manhattan Beach PD -- and when officers ran a check on him they discovered a massive $26,000 unpaid traffic warrant for driving on a suspended license.

We're told Barnes made threats against one of the officers -- which is why he got slapped with the felony for resisting.

Barnes played for the Los Angeles Lakers last year, but is currently a free agent. He's being held on $51,000 bail -- 26 for the unpaid warrant, and 25 for the felony.

Barnes posted bail and was released at 11:20PM.

He later tweeted about the incident ... writing, "Oh.. For all you perfect people out there looking at me w/your nose in the air, who have "NEVER" missed a court date for a "TRAFFIC VIOLATION" God Bless You..."