Charlie Sheen and Brooke Mueller have reached an agreement over custody of their twin boys and they confirmed the news on the same night the actor’s home was raided by police. Sheen’s estranged wife won a restraining order against him last week after alleging the Two and a Half Men star had threatened her.

The court order temporarily stripped Sheen of all custody rights for the former couple’s young sons, Bob and Max, and the children were subsequently removed from the actor’s care.

Sheen and Mueller were due in court on Friday to discuss the matter, but on Thursday night they released a joint statement confirming a deal had been reached and the court date cancelled.

The statement reads, “Brooke and Charlie have reached an agreement that resolves their differences. For the benefit of the children, the terms of their agreement will not be disclosed. They ask the public for privacy on this matter.”

The news came on the same night Los Angeles Police Department (LAPD) officers raided Sheen’s Los Angeles home, after reportedly receiving a tip-off the star was keeping a gun at the property – a move which would violate Mueller’s restraining order banning him from possessing weapons.

Officers discovered an antique rifle from the 1800s and “a few bullets”, but no other weapons were found, according to Sheen’s lawyer Mark Gross.

LAPD spokeswoman Norma Eisenman tells Usmagazine.com, “We were there to investigate the possible violation of a restraining order. It came to our attention that Mr. Charlie Sheen is a registered owner of firearms so we were making sure there were no firearms or ammunition in the home.

“We are not releasing any findings. Mr. Sheen was very cooperative and the investigation is complete. We are done with it.”