LOS ANGELES — “Better Call Saul” star Bob Odenkirk collapsed on the show’s New Mexico set on Tuesday and had to be hospitalized.

Crew members called an ambulance that took the 58-year-old actor to a hospital, where he remained Tuesday night, a person close to Odenkirk who was not authorized to speak publicly on the matter told The Associated Press.

It was not immediately clear what caused the collapse or how long Odenkirk might be hospitalized.

“Better Call Saul,” the spin-off prequel to “Breaking Bad,” has been shooting its sixth and final season, which is set to air on AMC next year.

Like “Breaking Bad,” “Better Call Saul” is set in and mostly shot in Albuquerque.

An email sent to a representative of AMC seeking more information or comment was not immediately returned.

Odenkirk has been nominated for four Emmys for playing the title character, a down-on-his-luck lawyer named Jimmy McGill who becomes increasingly corrupt and adopts the pseudonym Saul Goodman.

Michael McKean, Odenkirk's co-star who played his brother on the show, was among many wishing Odenkirk well on social media.

“Sending huge love to our @mrbobodenkirk,” McKean tweeted. “You got this, brother.”

Odenkirk's hospitalization was first reported by TMZ.

Before the “Saul” role, which he also played on “Breaking Bad,” Odenkirk was best known for “Mr. Show With Bob and David,” the sketch comedy series he co-created with David Cross that originally aired on HBO from 1995 to 1998.

He has won two Emmys, for his writing on “The Ben Stiller Show” and on “Saturday Night Live.”

He has also appeared on HBO’s “The Larry Sanders Show” and in the films “The Post,” “Little Women” and “Nobody.”