“The Hobbit: An Unexpected Journey” took in $13 million in midnight grosses last night at 3,100 locations in North America, for an average of $4,193 per theater, Warner Bros. reported.

That was the highest ever midnight gross for the month of December, according to Paul Dergarabedian, president of the box-office division at Hollywood.com.

“This is a solid start for a December release and though projections are all over the map, the film has a shot at besting the all time December opening weekend record set by ‘I Am Legend”s $77 million,” Mr. Dergarabedian said.

By comparison, the highest midnight gross ever was “Harry Potter and the Deathly Hallows, Part 2,” released by Warner Bros. in July 2011. It earned $43.5 million in North America. “The Dark Knight Rises,” released by Warner Bros. in July 2012, took in $30.6 million, making it the second-highest midnight gross.