Miranda Lambert wrote her new song, "Two of a Crime," specifically for the big screen.

When actress Reese Witherspoon asked Lambert to write a track for her upcoming comedy, Hot Pursuit, the talented singer-songwriter agreed to pen a song especially for the movie. The comedy stars Witherspoon as a novice police officer who must protect a drug dealer's widow (Sofia Vergara) from criminals and dirty cops alike.

"Reese texted me and told me about the movie and wanted me to write something or sing or both," Lambert says during a chat with Ryan Seacrest's On Air radio show. "I got inspired. I love Reese and Sofia. It was a bit of a Thelma and Louise theme, and that's totally up my alley. It is really so fun to be part of it. It was the first time I wrote a song specifically for a movie, so it was a different experience for me."

Lambert wrote the song alongside regular collaborators Natalie Hemby and Nicolle Galyon. After Witherspoon said she wanted to have a "southern and a Latin flavor" to the track, Lambert and her trusted collaborators created a song that blended the two styles perfectly.

An iTunes version of the song will be available on April 28. Hot Pursuit will hit theaters on May 8. The film is being released by New Line Cinema and Metro-Goldwyn-Mayers Pictures. For more information about the movie, visit the official website.

See Miranda Lambert's Best Hairstyles Through the Years

You Think You Know Miranda Lambert?