Justin Bieber's single days are officially over ... again ... for now ... 'cause he's back on with Selena Gomez -- but TMZ has learned there's one major catch -- he's gotta stop acting like a d-bag.
According to sources, Selena had firmly resisted reuniting with Justin after their most recent breakup because he and his friends have been acting like raging self-entitled jackasses the last few months -- smoking pot, speeding around in expensive cars, and pissing in mop buckets.
But Justin -- being the Casanova that he is -- was able to change her mind ... and on July 4th, we're told he won her back by promising to change his douche ways. Apparently, Selena bought it.
We're told JB and his "Wild Kidz" goons have taken notice of the public backlash against their ridiculous behavior -- hard not to -- and they all decided to clean up their acts.
Sounds like BS -- considering Bieber's abysmal track record for making phony apologies and continuing to act like an oblivious self-important douche-baby -- but our sources say Selena has always been an extremely positive influence on him ... and if anyone can change him, it's her.
Bottom line, it seems like no one else can fix Justin, so why not give Selena a shot? It might just be crazy enough to work.