LOS ANGELES - The latest Harry Potter movie cast a $104 million spell over worldwide box offices during its first day in theaters, setting a new record for the boy wizard, distributor Warner Bros Pictures said on Thursday.

Harry Potter and the Half-Blood Prince, the sixth in the film series based on the popular books by J.K. Rowling, grossed $58.18 million in North America and $45.85 million overseas on Wednesday, the Time Warner Inc-owned studio said.

The U.S.-Canadian tally, which includes a record $22.2 million from midnight showings, marks the second-biggest Wednesday opening domestically.

Only last month's Transformers: Revenge of the Fallen scored a bigger midweek first-day gross, with $62 million in domestic ticket sales on Wednesday June 24, according to Paul Dergarabedian, box office analyst for Hollywood.com.

The latest Harry Potter also ranks as the fourth-highest single-day gross for a film release in North America, behind No. 1 Dark Knight ($67.1 million), No. 2 Transformers: Revenge, and third-place Spider-Man 3 ($59.8 million).

Quite simply, we owe this record-breaking opening to the remarkable fans who have stood by us and who stood in line to be among the first to see 'Harry Potter and the Half-Blood Prince,' Warner Bros President and Chief Operating Officer Alan Horn said in a statement.

Said Dergarabedian: This is a tremendous opening. It's in the box office stratosphere.

The previous Harry Potter movie, Harry Potter and the Order of the Phoenix, also opened on a Wednesday last year with first-day domestic receipts of $44.2 million. That film went on to gross $937 million worldwide.

The first five films in the franchise, one of the most lucrative in Hollywood history, have so far taken in about $4.5 billion collectively at the global box office.

(Reporting by Jill Serjeant and Steve Gorman; Editing by Doina Chiacu and Todd Eastham)