LOS ANGELES — After a nine-month delay, “G.I. Joe: Retaliation” deployed to the top spot at the box office.

The action film starring Dwayne “The Rock” Johnson, Bruce Willis and Channing Tatum as the gun-toting military toys brought to life marched into the No. 1 position at the weekend box office, earning $41.2 million, according to studio estimates Sunday. “Retaliation” opened Wednesday at midnight, which helped bring its domestic total to $51.7 million.

Paramount postponed the sequel to 2009’s “G.I. Joe: Rise of Cobra” last May from its original June opening date to convert the film to 3-D. The last-minute switcheroo came just weeks after “Battleship,” another movie based on a Hasbro toy, sank at the box office. At that time, Paramount already began its advertising campaign for “Retaliation.”

After debuting in the top spot last weekend, the 3-D animated prehistoric comedy “The Croods” from DreamWorks Animation and 20th Century Fox slipped to the No. 2 spot.