Sometimes

Before recording her debut album, Spears had originally envisioned it in the style of "Sheryl Crow music, but younger  more adult contemporary". However, the singer agreed with her label's appointment of producers, who had the objective to reach a teen public at the time. She flew to Cheiron Studios in Stockholm, Sweden, where half of the album was recorded from March to April 1998, with producers Max Martin, Denniz Pop and Rami Yacoub, among others. "Sometimes" was written by Jörgen Elofsson, and produced by Per Magnusson and David Kreuger. Spears recorded the vocals for the song in May 1998, at Cheiron Studios in Stockholm, Sweden. It was also mixed at Cheiron Studios by Martin. Esbjörn Öhrwall played the acoustic guitar, while bass guitar was done by Thomas Lindberg. Keyboards and programming was done by Kreuger, and additional keyboards by Magnusson. Background vocals were provided by Anders von Hoffsten. Spears also co-wrote and recorded a track called "I'm So Curious", produced by Eric Foster White, that was released as a B-side to "Sometimes". The track was recorded in 1997 at 4MW East Studios in New Jersey. "Sometimes" was released as the second single from ...Baby One More Time on April 30, 1999.
Songwriting controversy:
The song created controversy over the writing credits. Steve Wallace, an Indiana songwriter, claimed he wrote "Sometimes" in 1990, but did not copyright it until 2003, four years after Spears registered the song's copyright. Wallace claimed Spears confessed he wrote the song, by showing to the court a possible e-mail from the singer, which said, "I now know for a fact that you wrote . But there's nothing I can do about it. That's all I can say about it." The e-mail was considered fake and the lawsuit was dismissed on October 31, 2005, when Judge John D. Tinder claimed the singer did not steal the song.