On January 3, 2008, Spears refused to relinquish custody of her sons to Federline’s representatives. She was hospitalized at Cedars-Sinai Medical Center, after police that arrived at her house noted she appeared to be under the influence of an illicit substance. The following day, Spears’s visitation rights were suspended at an emergency court hearing, and Federline was given sole physical and legal custody of the children. On January 31, 2008, Spears was committed to the psychiatric ward of Ronald Reagan UCLA Medical Center and put on 5150 involuntary psychiatric hold. The court placed her under temporary conservatorship of her father James Spears and attorney Andrew Wallete, giving them complete control of her assets. Spears was released on February 6, 2008. Her parents expressed disappointment and concern at the decision to release her. The following month, she guest-starred on the How I Met Your Mother episode “Ten Sessions” as receptionist Abby. She received positive reviews for her performance, as well as bringing the series highest ratings ever. In July 2008, Spears regained some visitation rights after coming to an agreement with Federline and his counsel. On September 7, 2008, Spears opened the MTV Video Music Awards with a pre-taped comedy sketch with Jonah Hill and an introduction speech. She won Best Female Video, Best Pop Video and Video Of The Year for “Piece of Me”.
Her sixth studio album Circus, was released in December 2008. It received positive reviews from critics; according to the music review aggregation of Metacritic, it garnered an average score of 64/100. Circus debuted at number one in Canada, Czech Republic and the United States, and inside the top in many European nations. In the United States, Spears became the youngest female artist to have five albums debut at number one, earning a place in the Guinness Book of World Records. She also became the only act in the Soundscan era to have four albums debut with 500,000 or more copies sold. Circus became one of the fastest-selling albums of the year, and has sold 3.5 million copies worldwide. Its lead single, “Womanizer”, became her first number one in the Billboard Hot 100 since “…Baby One More Time” and topped the charts in countries such as Belgium, Canada, Denmark, Finland, France, Norway and Sweden. In January 2009, Spears and her father James obtained a restraining order against her former manager Sam Lufti, ex-boyfriend Adnan Ghalib and attorney Jon Eardley—all of whom, court documents claim, had been conspiring to gain control of Spears’s affairs. The restraining order forbids Lutfi and Ghalib from contacting Spears or coming within 250 yards of her, her property or family members. Spears embarked on The Circus Starring Britney Spears in March 2009. With a gross of U.S. $131.8 million, it became the fifth highest grossing tour of the year. She released her second greatest hits album, The Singles Collection in November 2009. “3″ became her third number one single in the US, and was the first song to debut at the top of the charts in three years. Later that month, she released an application for iPhone and iPod Touch titled “It’s Britney!”. In May 2010, Spears’s representatives confirmed she was dating her agent Jason Trawick, and that they had decided to end their professional relationship to focus on their personal relationship. She also became the most followed user on social networking service Twitter. Spears designed a limited edition clothing line for Candie’s. It was released on stores in July 2010.
n early March 2010, it was confirmed by Spears’s label that she was working on her seventh studio album and that no official release date had been confirmed or announced. Further confirmation came when a representative for Britney told People’s web site that after completing her tour, Spears had been in the studio working on her next album.