The boys will move back in with their mom and their newly appointed temporary guardian, her brother Scott Mueller, within a week.

When Denise told the court she could no longer care for her ex’s boys, she agreed to a “smooth transition” while the four-year olds get used to being back with their mother, a source close to the case tells Radar exclusively.

Under the latest court-ordered living arrangement, Scott Mueller has been appointed temporary guardian over the boys. And in a highly unusual move, he’s being allowed to live with them in his sister’s home, with Brooke present.

All this has enraged dad Charlie Sheen, who didn’t want ex-wife Mueller to ever have custody of the kids again. Even more exasperating for the Anger Management star, they’ll all be living just a few blocks apart in the exclusive Mulholland Estates gated community.

He would have been happy to have them remain with his previous wife, Richards, with whom he has a great relationship.

But when Richards told the court that behavioral problems with the boys were making it impossible for her to consider raising them along with her three daughters, Scott Mueller petitioned to be named their temporary guardian.

Sheen has been sounding off on Twitter alleging that his sons are now in “harms way and grave danger.”

He’s risking being sent to jail for violating a court order against talking about the hotly disputed custody case.

And, as Radar exclusively reported, Scott Mueller has already petitioned the court to have Sheen pay him $55,000 a month in child support.