Daniel Craig Daniel Craig

In one of the closest — and most colorful — box-office battles this year, Cowboys & Aliens tied with The Smurfs for the top spot, Box Office Mojo reports.

Cowboys & Aliens, the sci-fi action film starring Harrison Ford and Daniel Craig, grossed an estimated $36.2 million in its opening weekend. The Smurfs, a big-screen version of the popular '80s cartoon show, earned the same amount in its first weekend out.

Captain America breaks Harry Potter's spell at the box office

Last weekend's No. 1 film, Captain America: The First Avenger, took third place with $24.9 million (for a two-weekend U.S. take of $116.8 million). Harry Potter and the Deathly Hallows: Part 2 followed at No. 4, drawing $21.9 million. The film also passed the $1 billion mark worldwide, becoming only the ninth film in history to do so. (Its domestic total so far: $318.5 million)

The weekend's other major new release, Crazy Stupid Love, came in fifth with $19.3 million.

At No. 6, Friends with Benefits grabbed $9.3 million. Horrible Bosses took seventh place with $7.1 million.

Rounding out the top 10: Transformers: Dark of the Moon (No. 8, $5.9 million, bringing its domestic total to $337.9 million), Zookeeper (No. 9, $4.2 million) and Cars 2 (No. 10, $2.3 million, for a total of $182.1 million).