LOS ANGELES — A lonely little robot made millions of friends during the weekend — and even outgunned Angelina Jolie.

“WALL-E,” the Pixar Animation tale of a robot toiling away on a long-abandoned Earth, debuted as the No. 1 movie with $62.5 million in ticket sales, with Jolie’s assassin thriller “Wanted” opening in second place with $51.1 million, according to studio estimates Sunday.

The two movies combined to keep Hollywood on a roll. The top 12 movies took in $179.2 million, up 22 percent from the same weekend last year, when Pixar’s “Ratouille” opened with $47 million.

It was the fifth straight weekend that revenues climbed. Revenues for the summer season that began May 2 are up 6 percent over last year’s record pace, according to box-office tracker Media By Numbers.

The sour economy and high gas prices may be helping to fuel Hollywood’s boom, said Paul Dergarabedian, president of Media By Numbers. Movies tend to thrive when times are tough because they are relatively cheap compared to sports events, concerts and other outings.

“Audiences are obviously gravitating toward the movies as their first choice for entertainment,” Dergarabedian said. “It doesn’t take that much gas to get to the local multiplex. That might have a little something to do with this, as well.”

The previous weekend’s No. 1 movie, the Warner Bros. comedy “Get Smart,” slipped to third place with $20 million, raising its total to $77.3 million.

“WALL-E” maintains the perfect track record of Pixar, the Walt Disney unit that has made nine films, all of them critical and commercial successes, including “Cars,” “Monsters, Inc.” and the “Toy Story” flicks. “Finding Nemo” and “The Incredibles” put up the biggest opening-weekend numbers among Pixar movies, both pulling in just over $70 million.

Set centuries in the future, “WALL-E” is the story of a rickety, walking trash compactor that humans left running after abandoning the over-polluted planet.

Video: ‘Wall-E’ weekend
The movie overcame a dialogue challenge — the two main robot characters barely speak, beyond each other’s names — using wildly inventive visuals and sound effects to propel much of the story.

Like other Pixar films, “WALL-E” packed in family crowds, as well as adults without children.

“The real secret is they’re not children’s movies. They’re movies for everybody. Children absolutely adore them, but parents enjoy them on a different level,” said Mark Zoradi, president of Disney’s motion-picture group. “You can’t be nine-for-nine like Pixar is without that.”

The G-rated “WALL-E” was complemented by Jolie’s R-rated “Wanted,” which distributor Universal originally planned to release back in March. The studio decided the movie was too good to release at a slower moviegoing time and moved it to summer on a weekend when competition for a violent action tale would be light.

“We knew ‘WALL-E’ would be huge, but it’s not the same audience as ‘Wanted,”’ said Nikki Rocco, head of distribution for Universal.

“Wanted” stars Jolie as a member of a secret society of assassins whose new recruit (James McAvoy) is trained to use his superhuman abilities to take out a rogue killer.